Consumer Messaging Platform — WhatsApp-Class System  ·  View 06 of 23

Message Send and Delivery Path

The primary flow: compose, encrypt, accept, fan out, deliver and confirm — with the idempotency gate that makes a client retry harmless.

Editable source SVG draw.io All views
Compose
Compose
Double Ratchet
One key per message
Double Ratchet...
Sender Device
Assigns client_msg_id
Sender Device...
Ingress
Ingress
Connection Gateway
Authenticated socket
Connection Gateway...
Duplicate?
client_msg_id seen
Duplicate?...
Accept & order
Accept & order
Chat Service
Server id + timestamp
Chat Service...
Message Store
Ciphertext, TTL 30 d
Message Store...
Fan out
Fan out
Recipient Resolver
Account to device list
Recipient Resolver...
Fanout Workers
Sharded by device
Fanout Workers...
Per-device Inbox
Durable queue
Per-device Inbox...
Deliver
Deliver
Online Path
Push down open socket
Online Path...
Offline Path
Silent APNs / FCM wake
Offline Path...
Confirm
Confirm
Recipient Device
Decrypt, store, ack
Recipient Device...
Receipt Service
Delivered, read, played
Receipt Service...
no, accept
no, accept
yes, replay server id
yes, replay server id
receipt fanout to sender devices
receipt fanout to sender devices
Message Send and Delivery Path
Message Send and Delivery Path
Security / platform
Security / platform
Application we own
Application we own
Decision point
Decision point
Data store
Data store
Queue / topic
Queue / topic
synchronous
synchronous
failure / alternate
failure / alternate
event / async
event / async
Server ack sets the single tick; the recipient device sets every state after it.
Server ack sets the single tick; the recipient device sets every state after it.
v 1.0 · owner Platform Architecture · date 2026-08
v 1.0 · owner Platform Architecture · date 2026-08
Text is not SVG - cannot display

Ordering and identity

  • The client assigns client_msg_id; the server assigns the authoritative message_id
  • A duplicate client_msg_id replays the original server id instead of creating a second message
  • Per-conversation ordering follows server id, so two devices converge on the same sequence

Guarantees

  • At-least-once on the wire, exactly-once as observed by the user through client-side dedupe
  • The server acknowledges only after the ciphertext is durably written
  • Ciphertext is deleted the moment every recipient device has acknowledged it

State ownership

  • The server sets one state only: sent
  • Delivered, read and played are always emitted by the recipient device
  • A recipient with receipts disabled stops the chain at delivered