DEV Community

Cover image for What Really Happens When You Hit “Send” on WhatsApp?
Gouranga Das Samrat
Gouranga Das Samrat

Posted on

What Really Happens When You Hit “Send” on WhatsApp?

A Simple Breakdown of WhatsApp’s Real-Time Messaging Flow

Sending a message on WhatsApp feels instant — you tap Send, and it appears on the other side almost magically.
But behind that speed is an elegant system design working in milliseconds.

In this article, we’ll break down the WhatsApp message flow, step-by-step, in a simple and beginner-friendly way. Whether you’re exploring system design, distributed systems, or just curious about real-time messaging, this is a great example to learn from.

🚀 1. Your Message Gets Encrypted Immediately

The moment you hit Send, WhatsApp applies end-to-end encryption (E2EE) on your message.
This ensures only you and the recipient can read it — not WhatsApp, not the server, not your ISP.

Encryption happens locally on your device before the message leaves your phone.

📡 2. The Encrypted Message Is Sent to WhatsApp’s Servers

Once encrypted, the message is transmitted to the nearest WhatsApp server using a secure channel.

The server does not know the message content — it only handles metadata like delivery status.

🟢 3. Server Checks If the Recipient Is Online

WhatsApp’s servers now identify whether the recipient is:

  • Online
  • Offline
  • Connected on multiple devices

This check determines the next step.

📬 4. If the Recipient Is Online → Message Gets Delivered

Here’s the corrected line (as you mentioned):

If the recipient is online, the message is delivered instantly and synced across all linked devices.

That’s when you see the double grey ticks.

🕒 5. If the Recipient Is Offline → Message Gets Queued

If the recipient is offline, WhatsApp stores your encrypted message temporarily.

The message stays in a secure delivery queue until:

  • Their device reconnects
  • It establishes a session with WhatsApp
  • The message can finally be delivered

Once delivered → you see the double grey ticks.

👁️ 6. Read Receipts Are Sent Back

When the recipient opens your chat and reads the message, a read receipt is sent back to your device.

That’s when your double blue ticks appear.

⚡ All This Happens in Seconds — Securely & Efficiently

WhatsApp optimizes for:

  • Low latency
  • Strong encryption
  • High availability
  • Multi-device synchronization

This makes it one of the most reliable messaging systems in the world.

📊 I Visualized the Architecture

I’ve created a simplified diagram of this entire message flow to help you understand the architecture at a glance.

(Visual goes here.)

🔍 Want More Real-World System Design Breakdowns?

If you’d like deep dives into systems like:

  • Instagram feed ranking
  • Uber’s real-time location tracking
  • Netflix video streaming
  • Google Maps route calculation
  • Paytm/UPI transaction flow

Just let me know — I’d love to break them down!

🙏 Stay Connected!

🔔 Follow for more guides on JavaScript, React.js & interview prep.

**_Thankyou! for reading my article.

Top comments (0)