WhatsApp System Design

Blue Ticks

3 min read

One grey tick means the server has accepted your message.

Two grey ticks mean the message has reached the recipient's device.

Two blue ticks mean the recipient has actually opened and read the message.

How does WhatsApp know that?


Message Lifecycle

Notice that the message never changes.

Only its status changes.


Behind the Scenes

Suppose Alice sends Bob a message.

Bob receives it.

At this point Alice sees:

āœ“āœ“

(Grey Ticks)

Now Bob opens the chat.

His WhatsApp application generates a Read Receipt Event.

Notice that Bob never sends the message again.

He only sends a lightweight event.


What Does the Read Receipt Contain?

Typically something similar to

Message ID

Reader ID

Conversation ID

Timestamp

The server already knows the original message.

Only the Message ID is needed.


Why Separate Metadata?

The message itself never changes.

Only its metadata changes.

Examples

  • Delivered

  • Read

  • Edited

  • Deleted

  • Reactions

Keeping metadata separate makes updates much cheaper.


What About Group Chats?

Suppose there are 100 members.

Each member may read the message at a different time.

Instead of modifying the message itself,

the system stores read information separately.

Example

Message ID

↓

Read By

Alice

Charlie

David

Emma

This allows every user to have an independent read status.


Privacy Settings

If Read Receipts are disabled,

the application simply doesn't send the Read Receipt Event.

No event means

No Blue Tick.


Interview Notes

Interviewer

How does WhatsApp know you've read the message?

Answer

The client sends a lightweight Read Receipt Event referencing the Message ID.

The server forwards this event to the original sender.


Key Takeaways

āœ” Blue ticks are metadata.

āœ” The original message never changes.

āœ” Read receipts are lightweight events.

āœ” Every participant can have an independent read status.