Real-Time and Streaming System Design Questions

Designing client-facing, always-on live delivery systems: real-time communication transports (WebSockets, server-sent events, long-polling, WebRTC, MQTT), connection lifecycle and scaling for millions of persistent connections, presence, pub/sub fan-out to online users, chat and notifications, live feeds and tickers, real-time collaboration (CRDT vs OT, offline sync and reconciliation), and live and on-demand video delivery (ingest, transcoding, adaptive bitrate, CDN delivery, low-latency protocols, playback entitlement and content protection). Covers latency budgets, per-client ordering, delivery guarantees across disconnect and reconnect, per-client backpressure, capacity estimation for connection fleets, authentication, authorization, and revocation for real-time channels and premium content, and operational readiness (SLOs and error budgets, observability and incident response, rate limiting, safe rollout, and load and chaos testing) for live-delivery platforms. Data-pipeline stream processing (Kafka or Flink jobs, windowed aggregation, exactly-once pipelines, real-time analytics ingestion) is out of scope.

HardTechnical
66 practiced

Estimate capacity and do rough calculations: how many WebSocket connections can a single 32GB, 8-core server handle given per-connection protocol state ~1KB and average application buffer 50KB per active connection, leaving 6GB headroom for OS/runtime and other services? Show your calculations and describe other factors that could change your estimate (file descriptor limits, TCP buffer sizes, TLS memory overhead).

HardTechnical
60 practiced

Design strategies to manage memory usage for per-connection state in servers handling millions of persistent connections, so growth in connection count does not cause unpredictable memory spikes, OOM kills, or long GC pauses. Explain how you would represent, store, and evict that state, and how you would validate your approach holds at scale.

That is every published Real-Time and Streaming System Design question for Systems Engineer so far. Browse the other topics in this category, or practice this one interactively.