DSA Trainer
← System Design Foundations

System Design · Unit 18

Real-time & push

Two people are in a chat. Alice types "hey" and hits send. Her message travels to your server in an ordinary HTTP request, no problem. Now the interesting question: how does that message get to Bob's screen?

Here is the wall you hit. HTTP is request-response: the client asks, the server answers, the conversation ends. Bob's browser is not asking anything right now; it is sitting there displaying the chat. The server has news for Bob and no way to start a conversation with him. Plain HTTP has no doorbell.

Every "live" feature you have used (chat, notifications, stock tickers, collaborative docs, multiplayer games) is some workaround for this one limitation, and there are exactly three workarounds worth knowing: ask repeatedly (polling), ask and wait (long polling), or keep a line open (WebSockets). They form a ladder of freshness versus cost, and the interview skill is picking the cheapest rung that meets the actual need.

Goal: Explain why servers can't push over plain HTTP, compare polling, long polling, and WebSockets, and pick the cheapest mechanism that meets the freshness need.
Premium unit

The rest of the System Design course is premium

The first two units are free, and this is where the gate sits. Unlocking premium opens this unit and everything else in both courses:

  • This unit: 5 prediction-first lessons, 3 applied drills, and a 5-question graded test
  • All 20 System Design units, caching to CAP & consistency
  • The full DSA course: every unit, guided problem, and drill

Cancel anytime. Not useful within 7 days? Email for a full refund.

Not sure yet? Start with the free units →