#messaging
8 articles
Design a Distributed Message Queue (Kafka)
Build a durable, partitioned, replicated commit log like Kafka — ordering, consumer groups, replication (ISR), and exactly-once.
Design an Email Service (Gmail)
Send, receive, store, and search email for hundreds of millions of users. SMTP ingestion, sharded mailbox storage, full-text search, and spam filtering.
Design Slack (team chat at scale)
Channels, threads, presence, and search across huge workspaces. Real-time fan-out over WebSockets, the gateway problem, and read-state per user.
Idempotency & Exactly-Once Semantics
Networks retry, so your operations will run twice. Idempotency keys, dedup, and why "exactly-once delivery" is a myth but "exactly-once effect" is achievable.
Change Data Capture (CDC) & the Outbox Pattern
Turn your database write log into a reliable event stream. Log-based CDC, the dual-write problem, and the transactional outbox.
Design a Notification System (Push, Email, SMS)
A reliable multi-channel notification platform — fanout, templates, dedup, rate limiting, and the realities of APNS/FCM.
Design WhatsApp / Chat System
Realtime 1:1 and group messaging at billions-of-users scale. WebSocket gateways, message store, presence, end-to-end encryption.
Message Queues and Event Streams
Queues vs streams, Kafka in depth, delivery semantics, idempotency, dead-letter queues, schema registries, the outbox pattern, and stream processing fundamentals.