Urgent.News

What's breaking now, across thousands of outlets.

Tech

WebSocket Telemetry at Scale: When One Process Isn't Enough

[ EXECUTIVE TEARDOWN // TL;DR ] In-memory broadcast only reaches the local process — multi-instance real-time needs a shared backplane (Redis pub/sub). Scope subscriptions into rooms so each client receives only the streams it watches, collapsing bandwidth and CPU. Coalesce high-frequency sources on the server to a renderable frame rate before broadcasting. Handle backpressure at the source, not…

WebSocket telemetry scales beyond a single process by utilizing a shared backplane such as Redis pub/sub. Subscriptions are narrowed into rooms, allowing each client to only receive relevant streams, which reduces bandwidth and CPU. High-frequency sources should be coalesced at the server level to a renderable frame rate before broadcasting.

Backpressure should be handled at the source, not after it has flooded the client. In a multi-instance setup, each server instance owns its own connection table, so broadcasts cannot fan out to subscribers across instances. The Trinity Architecture pattern addresses this by separating the orchestration tier (UI) from the adapter that keeps payloads lean.

Serialization adapters can be employed to trim non-essential data, reducing telemetry frame sizes significantly. Proper scaling involves determining how far each event should travel before expanding horizontally, rather than dealing with performance issues post-scaling.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Fat jar vs layered jar; DevTools

Why your Spring Boot app is one runnable file You finish a Spring Boot service, run a single command, and a full web server starts up: java -jar app.jar No Tomcat to install first.

  • Spring Boot service compiled into single runnable file
  • Fat jar and layered jar are two packaging options
  • DevTools speeds up development process

How to Add Offline Support to Your Web App (without hand-writing a service worker)

The full walkthrough: one config file, an auditable vanilla-JS service worker + client runtime generated for you, zero runtime dependencies — and a live demo you can test offline right now.

  • Swoff is a config-driven generator for service workers and client runtime
  • Run npx @swoff/cli init && npx @swoff/cli generate to set up offline support
  • Verify offline functionality in browser developer tools

MongoDB Aggregation Pipelines: Stage Order Is the Win

[ EXECUTIVE TEARDOWN // TL;DR ] Put $match first and on indexed fields — every document eliminated early is one the rest of the pipeline never touches.

  • Order of stages in MongoDB aggregation pipelines significantly impacts performance.
  • $match stage first and indexed fields improve efficiency.
  • $lookup stage often most expensive; run after $match and $limit.

The 94% Decision: One Architecture Call That Made IntegrateX Feel Instant

[ EXECUTIVE TEARDOWN // TL;DR ] The near-fatal trap: JSON.stringify-ing React Flow nodes persists the view — 90%+ renderer state the client can reconstruct for free.

  • IntegrateX's architecture relied on JSON.stringify-ing React Flow nodes, causing large payloads.
  • Lossless, schema-aware Serialization Adapter reduced payloads by 94% round-trip.
  • Architectural decision led to instant saves, stable versioning, and UI redesigns.

More from Saturday 12 September →