How Messages Travel Securely from Sender to Recipient
Even When Users Are Offline
End-to-End Encryption
Server Infrastructure
Receiving Messages
What happens when the recipient is offline?
Your device encrypts and sends message to WhatsApp server
Single Grey Tick ✓
Server detects recipient is not connected (phone off, no internet, app closed)
Server stores encrypted message in queue for up to 30 days
Device connects to internet and WhatsApp. Push notification sent
Message delivered to device. Server deletes its copy permanently
Double Grey Ticks ✓✓
WhatsApp uses the Signal Protocol, which is considered the gold standard for secure messaging. End-to-end encryption (E2EE) means that your messages are encrypted on your device and can only be decrypted by the recipient's device. Not even WhatsApp can read your messages.
Here's how it works: Every WhatsApp user has two keys—a public key (like a mailbox that anyone can put letters into) and a private key (like the unique key to open that mailbox, which only you have). When you send a message, your WhatsApp encrypts it using the recipient's public key. This creates ciphertext—scrambled data that looks like random characters. Only the recipient's private key, which never leaves their device, can decrypt and read this message.
When you type a message and hit send, several things happen in milliseconds. First, your WhatsApp app encrypts the message using the recipient's public key. This encrypted message is then sent over the internet to WhatsApp's servers. At this point, you see a single grey tick (✓), indicating the message reached the server successfully.
WhatsApp's servers act as a relay station—they forward messages but cannot read them because they're encrypted. The server checks if the recipient is currently online and connected. If they are, the message is immediately delivered to their device. If they're offline, the server stores the encrypted message temporarily.
This is where WhatsApp's infrastructure really shines. When the recipient is offline—their phone might be turned off, they might have no internet connection, or the app might be closed—WhatsApp's servers store the encrypted message in a queue. The message can stay in this queue for up to 30 days.
During this entire time, the message remains encrypted. WhatsApp's servers are simply holding onto encrypted data they cannot read. It's like holding a locked safe without having the key to open it. The 30-day limit is a practical balance: it gives users plenty of time to come back online while not storing data indefinitely.
The moment the recipient's device connects to the internet and opens WhatsApp, the server detects this and immediately sends a push notification. The encrypted message is then delivered from the queue to the recipient's device, where it's decrypted using their private key. You then see double grey ticks (✓✓), meaning the message was successfully delivered.
The tick system provides transparency about your message's status. A single grey tick means WhatsApp's server received your message. Double grey ticks mean the message was delivered to the recipient's phone. When those ticks turn blue, it means the recipient opened the chat and read your message (though they can disable read receipts in settings).
If you see a clock icon instead of ticks, it means your device hasn't been able to send the message to WhatsApp's servers yet—usually due to no internet connection on your end.
WhatsApp's backend infrastructure is built using Erlang, a programming language designed for telecommunications systems that need to run 24/7 without downtime. Erlang runs on the BEAM virtual machine, which is incredibly efficient at handling millions of concurrent connections.
This technology choice is crucial for WhatsApp's scale. The platform handles over 100 billion messages daily across more than 2 billion users worldwide. Erlang's fault-tolerant design means that if one server fails, messages are automatically rerouted through other servers without users experiencing any disruption.
WhatsApp uses a customized version of the XMPP (Extensible Messaging and Presence Protocol) for messaging. This protocol is optimized for mobile devices, using binary data formats that reduce bandwidth usage and save battery life—critical for users in areas with limited connectivity or older devices.
The beauty of WhatsApp's E2EE implementation is that privacy is built into the architecture, not just promised as a policy. Even if someone gained access to WhatsApp's servers, they would only find encrypted messages they cannot read. Even if a government demanded access to your messages, WhatsApp couldn't provide readable content because they don't have the decryption keys.
Your private keys are generated on your device and never leave it. They're stored in your phone's secure storage, protected by your device's operating system security. When you switch to a new phone, new keys are generated—which is why your message history doesn't automatically transfer (unless you use a backup, which is stored separately).
Once a message is successfully delivered to the recipient's device and WhatsApp confirms delivery (double grey ticks appear), the server immediately and permanently deletes its copy of the encrypted message. The server no longer has any record of your message.
The only copies of the message that exist are on your device and the recipient's device. This is fundamentally different from many other messaging platforms where messages are stored on company servers indefinitely.
WhatsApp's infrastructure is designed to be both massively scalable and highly reliable. The system is distributed across multiple data centers worldwide. When you send a message, it's automatically routed through the fastest available path to reach WhatsApp's servers and then to your recipient.
This distributed architecture means that even if entire data centers go offline, the system continues functioning. Messages find alternative routes, and the queuing system ensures that messages sent while someone is offline are reliably delivered once they reconnect.
Understanding how WhatsApp encryption works helps you appreciate the sophisticated technology protecting your communications. Every casual "hello" to a friend, every photo you share, every voice message you send is protected by military-grade encryption that even WhatsApp itself cannot break.
This system balances three critical needs: security (messages are private and encrypted), reliability (messages are delivered even when people are offline), and scale (billions of messages daily across billions of users). It's a remarkable achievement in modern communications technology.