Question #14 of 60•Protocols•Medium• ~3 min read

What are the trade-offs of Push vs. Pull models in real-time notification architectures?

Executive Takeaway

Evaluate client-side polling vs server-side streaming (WebSockets, SSE) for chat apps, notification feeds, and live stock charts.

Architectural Breakdown & AnalysisFAANG Aligned

Real-time applications require choosing between client-initiated pull mechanisms and server-initiated push streams.

ModelProtocolProsConsBest Use Case
HTTP Short PollingStandard HTTPSimple implementationExtreme server overhead & wasteLow-frequency status checks
HTTP Long PollingStandard HTTPImmediate response on dataConnection setup overheadLegacy browser push
Server-Sent Events (SSE)HTTP/2 StreamUnidirectional, lightweight, auto-reconnectServer-to-client onlyLive dashboards, stock tickers
WebSocketsTCP WSBi-directional, sub-5ms latencyComplex scaling & connection stateReal-time chat, multiplayer games
NOTE — Protocol Selection

Choose SSE for notification feeds where client-to-server messaging is minimal. Reserve WebSockets for bi-directional streaming applications.

Previous QuestionHow does Kafka scale consumer groups and handle partition delivery guarantees?Next Question How do you handle hot partitions (the celebrity problem) in social feeds?

Continue Learning on Being SDE

Explore deep-dive system architecture modules, low-level object-oriented designs, and interview cheat sheets.