System Design, Redis & Distributed Systems
5-8 Years (Senior)
Medium
Production Scenario
Explain the Difference between Polling, Long-Polling, Server-Sent Events (SSE), and WebSockets.
Real-World Scenario / Incident Description
Selecting the most efficient realtime communication protocol for live stock price tickers vs bi-directional collaborative canvas editing.
49 views
•
Updated 1 month ago
Protocol Comparison
| Protocol | Direction | Overhead | Ideal Use Case |
|---|---|---|---|
| Short Polling | Client -> Server | High (repetitive HTTP headers) | Simple status checks |
| Long Polling | Client -> Server (held open) | Medium | Fallback when WebSockets blocked |
| Server-Sent Events (SSE) | Server -> Client Only | Very Low (Standard HTTP) | Live Feed, Stock Tickers, AI Streaming text |
| WebSockets | Full Duplex Bi-directional | Minimal (Single TCP handshake) | Multiplayer Games, Chat, Collaborative Editing |
Related Concepts:
#SSE
#WebSockets
#Long Polling
#Protocols
More System Design, Redis & Distributed Systems Interview Questions
How does the Redis Redlock Algorithm provide Fault-Tolerant Distributed Locking across independent Redis nodes?
Read →
Explain the 3 High-Scale Cache Failure Patterns: Cache Avalanche, Cache Breakdown (Dog-Piling), and Cache Penetration, with mitigations.
Read →
Compare Rate Limiting Algorithms: Token Bucket, Leaky Bucket, Fixed Window Counter, and Sliding Window Log/Counter.
Read →
How do you design a Real-Time Notification System delivering to 10M concurrent users with WebSockets and Redis Pub/Sub?
Read →
How do you design an Idempotent Payment Processing Architecture with the Saga Pattern across Microservices?
Read →