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.

MediumTechnical
55 practiced

Compare WebRTC data channels and WebSocket for real-time peer-to-peer data synchronization use cases (e.g., multi-user collaborative whiteboard). Include signaling architecture, NAT traversal (STUN/TURN), expected throughput/latency differences, privacy/security trade-offs, and operational costs/complexity (TURN servers, scaling signaling). When would you choose one over the other?

HardTechnical
56 practiced

You're designing the security posture for a WebSocket/SSE-based realtime platform that accepts connections from third-party clients as well as your own apps. A persistent, bidirectional channel introduces risks a typical stateless API does not. Identify the primary risks such a channel is exposed to, and for each, propose concrete mitigations and explain how you would implement them across the edge, application, and broker layers.

HardSystem Design
53 practiced

Design an architecture to handle 10 million concurrent persistent connections globally across multiple regions, supporting failover, low latency, and broadcasting messages to any subset of users, with regional latency SLOs under 500ms. Discuss regional affinity, global routing (GeoDNS/GSLB), sticky-session implications, edge proxies, how connection state is stored, consistency of presence state, cross-region replication of pub/sub metadata, and failover design.

MediumTechnical
58 practiced

What metrics, logs, and traces would you instrument to monitor a realtime streaming platform (WebSocket frontends, message broker, consumers)? Include per-connection metrics, message latency percentiles, backpressure indicators, reconnection rates, auth failures, and queue depths. Propose SLOs, alerting rules, and runbook actions for the common failure modes, and describe how you'd present this in dashboards for an on-call team.

MediumTechnical
58 practiced

Design how to guarantee message ordering within a chat conversation while accepting at-least-once delivery semantics from the underlying broker. Detail client and server-side strategies including sequence numbers, per-conversation partitions, buffering and reordering on clients, dealing with gaps, and reconciling messages after reconnect. Explain trade-offs between user-visible latency and ordering guarantees.

Unlock Full Question Bank

Get access to all Real-Time and Streaming System Design interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.