WebSocket live updates in monitoring UIs

When push-based probe updates beat SSR polling for dashboard freshness—and what this Astro site does instead.

Next.js and Node servers often pair monitoring dashboards with WebSockets or SSE for live tiles without full page reload. Garage probes change slowly—30–120 second cadence—so aggressive push channels rarely justify complexity here. Understanding the pattern helps compare this stack with Next.js dashboards you might build elsewhere.

Browser dashboard receiving WebSocket push updates from Node server
WebSocket channels push probe JSON to browsers as soon as the server polls upstream hardware.

Architecture sketch

  1. Node polls Arduino on an interval.
  2. Server broadcasts JSON to connected WebSocket clients.
  3. Browser updates charts without navigation.

Tradeoffs

  • Pros: Instant feel for ops desks; multi-user fan-out.
  • Cons: Stateful servers, reconnect logic, harder edge deploy than SSR fetch.
  • Garage reality: DHT22 limits poll rate—push faster than reads is pointless.

Hybrid alternative

This project uses SSR plus optional client refresh islands—Astro islands. For LAN-only live views, see local Node patterns in Express API patterns.