Back to roadmap
Module 9 · Protocols, Security, ObservabilityDay 08320 min

Polling, Long Polling, and Push Models

Climb the realtime ladder by problem, not preference.

Day 083

Polling, Long Polling, and Push Models

Short poll
note
Long poll
note
Push
note
Memory hook

Polling, Long Polling, and Push Models: climb the realtime ladder by problem, not preference

Mental model

design for the day something breaks

Design lens

Long poll keeps connections held; LB capacity matters.

Recall anchors
Short pollLong pollPush (WS/SSE)

Why it matters

Short polling repeatedly hits the server. Long polling holds a request open until data is ready. Push (WebSocket/SSE) opens a stream. Each is right for a band of update frequency and latency need.

Deep dive

<1 update/min: short poll is fine.

1–60 updates/min: long polling or SSE balances cost.

>1/sec: WebSocket or persistent stream.

Demo / scenario

Notification feed: ~10 updates/hour per user.

  1. Short poll every 30s? Wasteful at 10M users.
  2. Long poll: server holds connection up to 60s.
  3. Server replies on event; client immediately reconnects.
  4. Cheaper than continuous push for moderate frequency.

Tradeoffs

  • Long poll keeps connections held; LB capacity matters.
  • Push minimizes latency but costs sessions.
  • Short poll is easiest to debug.

Diagram

Short poll
Long poll
Push
Polling models.

Mind map

Check yourself

Loading quiz…

Sources & further reading