WhatsApp HLD: Real-Time Chat for Billions, Online or Off
A WhatsApp / chat-at-scale system design: persistent connections and a routing registry, store-and-forward for offline users, idempotent ordered delivery, and the delivery-tick receipts.
"Design WhatsApp." Sending a message looks like one POST, but the hard parts hide behind "real-time" and "billions." The recipient might be online on a phone connected to a different server across the world, or offline in a tunnel, or have just retried the same send because their signal flickered. The system has to deliver exactly once as the user perceives it, in order, fast when both are online, and eventually when they're not — across a fleet where each user holds a long-lived connection to some one machine. Three problems carry the design: routing (a message must find the server holding th…
What’s inside
Read this one free
Sign in and your first premium article is on us — read WhatsApp HLD: Real-Time Chat for Billions, Online or Off free.