Real Time Updates easy
Why is Short Polling considered 'Chatty'?
- A It sends text messages.
- B It requires voice commands.
- C Every check requires a full HTTP Request/Response handshake and headers, even if there is no new data.
- D It opens multiple ports.
Answer: C. Every check requires a full HTTP Request/Response handshake and headers, even if there is no new data.
If you poll every second, you send headers (Cookies, User-Agent, etc.) 60 times a minute. This overhead often exceeds the actual data payload size.
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?
- Server-Sent Events (SSE) are ideal for which type of real-time application?
- What is the primary advantage of using a WebSocket over standard HTTP for a chat application?