Skip to content
archive

whatsapp-message-delivery-system-design

wiki · · 1 min read

WhatsApp Message Delivery System Design

Definition

Detailed interview answer covering requirements (1:1/group chats, near real-time, at least-once with idempotency, per-conversation ordering, offline/multi-device support), data model (Message table keyed by thread+seq, delivery state per device), architecture (regional API gateway → chat service for seq assignment + durable log, fanout to per-device inboxes, WebSocket push for online, polling for offline), scaling (threadId sharding, LSM KV stores like Cassandra/Scylla for inboxes), tradeoffs (at-least-once over exactly-once, per-thread ordering, pointers over full bodies in inboxes), and failure handling (retries with clientMsgId, leader election for seq allocators, backpressure on hot groups).

Sources

  • raw/Dev/2026-06-24-0xlelouch_-whatsapp-message-delivery-system-design.md