Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_planet-scale-chat

Planet-Scale Chat System (Billions of Users, E2EE & Multi-Device)

6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Planet-Scale Chat System (Billions of Users, E2EE & Multi-Device) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_planet-scale-chat/opengraph-image)](https://archos.sageideas.dev/d/dgm_planet-scale-chat)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_planet-scale-chat)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_planet-scale-chat" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Planet-Scale Chat System (Billions of Users, E2EE & Multi-Device) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["Billions of Devices"]
  n1_1["Global Chat Edge"]
  n2a_2["Routing & Fan-Out"]
  n2b_3[("Offline Push & Sync")]
  n3_4[("Sharded Msg Store")]
  downstream_5["Downstream & OTel"]
  client_0 -->|"1. Send msg · WSS"| n1_1
  n1_1 -->|"2a. Route msg · gRPC"| n2a_2
  n1_1 -.->|"2b. Queue push · Kafka"| n2b_3
  n2a_2 -->|"3a. Persist · CQL"| n3_4
  n2b_3 -->|"3b. Apply · Async"| n3_4
  n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • Billions of DevicesSTATELESS
    Mobile/desktop E2EE messaging
  • Global Chat EdgeSTATELESS
    Persistent QUIC/WS gateway
  • Routing & Fan-OutSTATELESS
    1:1 direct + group fan-out
  • Offline Push & SyncSTATEFUL
    APNs/FCM + per-device inbox
  • Sharded Msg StoreSTATEFUL
    Cassandra/Scylla time-bucket
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. Billions of Devices → Global Chat Edge (Send msg)[WSS]
  2. Global Chat Edge → Routing & Fan-Out (Route msg)[gRPC]
  3. Global Chat Edge → Offline Push & Sync (Queue push)[Kafka]
  4. Routing & Fan-Out → Sharded Msg Store (Persist)[CQL]
  5. Offline Push & Sync → Sharded Msg Store (Apply)[Async]
  6. Sharded Msg Store → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →