Real Time Updates hard
Why does switching from WebSockets (TCP) to WebTransport (QUIC/UDP) improve video streaming performance on lossy networks (1% packet loss)?
- A UDP has higher bandwidth limits.
- B In TCP, one lost packet halts the delivery of *all* subsequent packets (Head-of-Line Blocking). In QUIC, independent streams allow Video Frame B to arrive even if Video Frame A is lost.
- C QUIC does not use encryption.
- D TCP headers are too large.
Answer: B. In TCP, one lost packet halts the delivery of *all* subsequent packets (Head-of-Line Blocking). In QUIC, independent streams allow Video Frame B to arrive even if Video Frame A is lost.
TCP enforces global order for the connection. QUIC enforces order only per stream. If stream 1 drops a packet, stream 2 continues flowing. This prevents the 'buffering' circle during minor network glitches.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- When a mobile app is closed/backgrounded, it cannot keep a WebSocket open. How does it receive real-time alerts (like 'New Message')?
- For a human user, what is generally considered the maximum acceptable latency for an interaction to feel 'Real-Time' (e.g., typing in a Google Doc)?
- If you want to update a news feed on a website every time a new article is published, what is the simplest (but least efficient) 'Real-Time' technique?
- In a persistent real-time connection, what is the purpose of a 'Heartbeat' or 'Ping/Pong' message?
- Why is Short Polling considered 'Chatty'?
- Server-Sent Events (SSE) are ideal for which type of real-time application?