
Communication · complexity 4/5
Messaging at scale
How a chat app for one-to-one and group conversations grows from one server with long polling to millions of open connections, partitioned message storage and end-to-end encryption — with WhatsApp's, Signal's and Discord's published material as the documented examples
A chat message must reach a phone that may be asleep, offline or on a train, once and in order. See how gateways, inboxes, sequence numbers, partitioned storage and end-to-end encryption make that work.
- Persistent connections
- Session registry
- Store-and-forward
- Delivery receipts
- Per-conversation sequence numbers
- Client-generated message ids
- Push to wake
- Partition by conversation and time
- Group fan-out
- Soft-state presence
- End-to-end encryption