Last Minute Notes
  • Github
  • Docs
  • Learn
    @sayanstwt
Lessons
0/37 done
  • Queues & Streams
  • Real-Time Updates
  • REST, gRPC & GraphQL
  • Events & the Outbox
Learn/System Design/Communication

Real-Time Updates

7 min Beginner 6 steps

Polling, long polling, SSE and WebSockets side by side.

ClientServermsg #7 arrivesGET /feed200 (old data)new data appears, but nobody tells the client
request reply failure
In this lessonStep 1 of 6
  1. The problem
  2. Short polling
  3. Long polling
  4. SSE
  5. WebSocket
  6. Recap
Step 1 / 6problem

The server cannot call you

HTTP is request and response. The server only speaks when the client asks.

For chat, feeds and live scores, the server needs to deliver data the moment it exists.

Key idea

Real-time techniques differ in latency, cost per client and direction. Pick the lightest one that fits.

←→ step·R replay·Space pause

You'll learn

  • Why plain request/response cannot push
  • Polling vs long polling
  • When SSE is enough
  • When to use WebSockets, and what they cost
Read the full notesHLD Building Blocks, 14