WhatsApp System Design

Multi-Device Sync

2 min read

Modern messaging apps support

  • Phone

  • Laptop

  • Tablet

  • Desktop

All devices stay synchronized.

How?


Device Registration

Every device is registered to the account.

Example

User

↓

Phone

Laptop

Tablet

Each device maintains its own secure connection.


Synchronization Flow

Each linked device receives the same message independently.


Why Not Sync From Phone?

Suppose your phone battery dies.

Your laptop should still receive new messages.

This is why every linked device maintains its own secure session.


Offline Devices

If your laptop is offline,

the server temporarily stores pending events.

When the laptop reconnects,

it requests missing messages.


Synchronization

Devices periodically synchronize

  • Messages

  • Read receipts

  • Delete events

  • Edit events

This ensures every device eventually reaches the same state.


Interview Notes

Interviewer

Why doesn't the laptop fetch everything from the phone?

Answer

Because every linked device communicates independently with the backend.

The phone is not a dependency.


Key Takeaways

āœ” Every device has its own connection.

āœ” Devices synchronize independently.

āœ” Offline devices catch up later.

āœ” Event ordering is maintained during synchronization.