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

Layered Architecture

What depends on what. Dependencies point downward only; delivery back to a device re-enters through the edge layer rather than reversing a dependency.

Editable source SVG draw.io All views
Client
Client
Chat, Calls & Status UI
Chat, Calls & Status UI
Local Message DB
SQLCipher
Local Message DB...
Signal Protocol Store
Signal Protocol Store
Media Cache
Media Cache
On-device Search Index
On-device Search Index
Transport
Transport
Noise Session
XX handshake
Noise Session...
Binary Framing
Multiplexed streams
Binary Framing...
Reconnect & Backoff
Reconnect & Backoff
Offline Outbox
Offline Outbox
Edge
Edge
Connection Gateway
Connection Gateway
Session Registry
Device to node
Session Registry...
Anycast Load Balancer
Anycast Load Balancer
Rate & Abuse Guard
Rate & Abuse Guard
Application services
Application services
Chat Service
Chat Service
Fanout Service
Fanout Service
Group & Community
Group & Community
Presence & Receipts
Presence & Receipts
Media Service
Media Service
Calls & Status
Calls & Status
Integration & async
Integration & async
Event Bus
Event Bus
Delivery Queue
Delivery Queue
Push Dispatcher
Push Dispatcher
Business API Gateway
Business API Gateway
Data
Data
Message Store
Message Store
Account & Group DB
Account & Group DB
Media Blobs
Media Blobs
Presence Cache
Presence Cache
Prekey Store
Prekey Store
Platform
Platform
Kubernetes & Service Mesh
Kubernetes & Service Mesh
HSM-backed KMS
HSM-backed KMS
Observability
OpenTelemetry
Observability...
CI/CD & Release Control
CI/CD & Release Control
encrypted frames
encrypted frames
TCP 443 / WSS
TCP 443 / WSS
gRPC, device claim
gRPC, device claim
publish
publish
persist
persist
Layered Architecture
Layered Architecture
Application we own
Application we own
Security / platform
Security / platform
Queue / topic
Queue / topic
Data store
Data store
synchronous
synchronous
event / async
event / async
Dependencies point downward only. Delivery back to a device re-enters through the Edge layer.
Dependencies point downward only. Delivery back to a device re-enters through the Edge layer.
v 1.0 · owner Platform Architecture · date 2026-08
v 1.0 · owner Platform Architecture · date 2026-08
Text is not SVG - cannot display

Layering rules

  • The client layer is a full peer, not a thin view — it holds the only plaintext copy
  • Application services never talk to a device directly; they publish and the edge delivers
  • No service reaches another service's store; all sharing is through the event bus or an API

Client is the system of record

  • The local encrypted database holds the durable chat history
  • Search, media cache and ratchet state are all device-local
  • Losing the server loses delivery latency, not conversation history

Platform layer

  • Kubernetes and a mTLS service mesh carry every service in the two upper bands
  • KMS is HSM-backed and serves envelope keys, never message keys