Urgent.News

What's breaking now, across thousands of outlets.

Tech

What Really Happens When You Send a WhatsApp Message?

You type: “Hey, are you free tonight?” You tap Send . A second later, your friend receives it. It feels like your phone simply sent a few characters to another phone. It didn't. Behind that single message is a distributed system handling network communication, encryption, message delivery, acknowledgements, offline users, multiple devices, and millions of concurrent users . So what actually…

When you type a message, such as "Hey, are you free tonight?", and press Send, WhatsApp initiates a complex process involving encryption, delivery, and decryption. The message travels through networks, including your Wi-Fi or mobile connection, an internet service provider, and eventually reaches WhatsApp's messaging infrastructure. This infrastructure uses a distributed system to handle the high volume of messages.

Key to the process is end-to-end encryption, which ensures that only the sender and recipient can read the message. This encryption is based on the Signal Protocol. Once the encrypted message reaches WhatsApp's servers, it is decrypted and routed to the recipient's device. If the recipient is not currently online, the message is stored temporarily, often in a queue or buffer, until they come online and can receive it.

The process is asynchronous, meaning the sender doesn't need to wait for the recipient to be online before sending the message. Instead, the system manages the message's delivery through various stages, such as "created," "sent," "delivered," and "read." Each stage represents a specific event or status.

For messages containing media like photos or videos, additional steps are involved. These messages need to be encrypted, prepared, uploaded to a media storage system, and then downloaded by the recipient's device for decryption and display. This process highlights the system's design for handling large files efficiently.

Throughout this entire process, the messaging system employs various techniques to ensure reliability, such as retrying operations when necessary and using acknowledgements to confirm that messages have been successfully delivered. This complex network of steps enables seamless communication between users, regardless of their online status or device.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

1.6T and Beyond: Decoding the Fundamental Shift Between MPO, NPO, and CPO

TL;DR: As AI networking shifts to 1.6T, transmission distance (from rack to chip) has replaced raw speed as the primary engineering bottleneck.

  • MPO focuses on high-density fiber interfacing at physical layer connector
  • NPO moves optical engine close to chip, reducing distance to millimeters
  • CPO integrates optical engine onto compute chip substrate, compressing distance to micrometers

More from Tuesday 22 September →