Design47 min
Pushing updates to clients the moment they happen.Persistent two-way connection between browser and server.Core featuresFull-duplex over one TCP connectionServer push, no pollingLow per-message overheadStateful: sticky, harder to load-balanceWhen to useChat, live collaboration, multiplayerLive feeds, presence, notificationsServer must push without being askedKeeping data correct when many requests touch it at once.Repeating a request has the same effect as doing it once.Delivering one event to many recipients, like a post to every follower.
PremiumOnline Chess / Chess.com
Two players, one board, a minute each: every move checked and timed by the server, a fair opponent found in seconds, and millions more watching, replaying and solving puzzles at the same time.
What they’re really testing: In a one-minute bullet game, a 300 ms mobile round trip is a real share of a player's time. One server must judge every move and both clocks, charge nobody for the network, never apply a move twice or lose one across reconnects and crashes, and still pair hundreds of players a second with fair opponents at peak.
Premium
This design is on the Premium plan
Readers with Lifetime Access read it in full. Already bought it? Sign in from the top bar.
What’s inside
- Primary concepts and the hard part
- Requirements
- API / Model
- High-level architecture
- Trade-offs and deep dives
- Possible follow-up questions