Tags

Messaging & Communication

Messaging & Communication

0 lessons
5 system designs

messaging-communication

System Design

5 articles
System Design

Design a Chat System (WhatsApp)

Design a real-time chat system like WhatsApp serving 2B users sending 100B messages per day with sub-second delivery, presence indicators, and read receipts. The interview centerpiece is the persistent WebSocket connection layer: how many connections per server, how to route a message to a recipient who may be on a different server, and how to guarantee delivery when the recipient is offline. We cover the message delivery state machine (sent, delivered, read), the connection routing layer that maps user_id to a chat server, the message store for offline delivery, and presence/typing indicators that operate at a higher write rate than messages themselves.

design-chat-system
case-study
messaging-communication
chat
websockets
real-time
presence
delivery-receipts
at-least-once
fan-out
session-affinity
system-design
intermediate
free

664

16

Medium
System Design

Design a Notification Service

Design a multi-channel notification service that delivers 10B push, email, and SMS notifications per day across three independent provider networks (APNs, FCM, SendGrid, Twilio) with priority queues, per-user rate limits, and idempotent retries. The interview centerpiece is the fan-out from a single application event to multiple channels and providers, each with its own rate limits, failure modes, and delivery semantics. We cover priority queues for transactional vs marketing traffic, retry policies with exponential backoff, deduplication of duplicate triggers, user preference enforcement, and the device token lifecycle that quietly invalidates tens of millions of tokens per day.

design-notification-service
case-study
messaging-communication
push-notifications
email
sms
priority-queue
rate-limiting
idempotency
fan-out
retry-policy
dead-letter-queue
system-design
intermediate
premium

946

29

Medium
System Design

Design an Email Service (Gmail)

Design an email service like Gmail handling 1.8B users storing 500EB of email, accepting ~300B inbound messages per day from the public SMTP network while filtering 90%+ as spam, and serving full-text search over a user's entire inbox in sub-200ms. The interview centerpiece is the asymmetric architecture: SMTP is an untrusted public protocol with hostile traffic patterns (spam, phishing, sender forgery) that needs heavy gateway-side filtering, while the user-facing IMAP/web layer needs cheap reads, pagination of huge mailboxes, and per-user inverted indexes for search. We cover the SMTP MX gateway, the spam pipeline (SPF/DKIM/DMARC + ML), the per-user inverted index for search, and how mailboxes scale when one user holds 50GB of email.

design-email-service
case-study
messaging-communication
email
smtp
spam-filtering
spf-dkim-dmarc
inverted-index
full-text-search
blob-storage
attachment-dedup
system-design
intermediate
premium

926

9

Medium
System Design
Premium

Design Video Conferencing (Zoom)

Design a real-time video conferencing system like Zoom that supports 1-on-1 calls and meetings of up to 1000 participants with sub-200ms glass-to-glass latency, adapts to user bandwidth, and runs reliably across mobile networks. The interview centerpiece is the choice of media topology: peer-to-peer mesh (small calls), MCU mixing (centralized, expensive), or SFU forwarding (the modern standard). We cover the WebRTC stack (signaling vs media planes, ICE/STUN/TURN), simulcast and SVC for adaptive quality, recording pipelines, and how to keep latency low when participants span multiple continents.

design-video-conferencing
case-study
messaging-communication
video-conferencing
webrtc
sfu
mcu
rtp
simulcast
svc
ice-stun-turn
low-latency-media
real-time
system-design
advanced
premium

547

11

Hard
System Design
Premium

Design Discord (Real-time Communities)

Design Discord, a real-time community platform with 200M monthly active users, organized into 'guilds' (servers) of up to 500K members each, with persistent text channels storing trillions of messages and live voice channels with sub-100ms latency. The interview centerpiece is the dual architecture: a sharded text-message store (Cassandra/ScyllaDB) with billions of messages per guild and per-channel ordering, plus a real-time voice infrastructure with regional voice servers and custom UDP transport. We cover guild sharding by Snowflake ID, the Elixir/Erlang gateway that holds millions of WebSocket connections, presence at the guild scale, and how Discord migrated from MongoDB to Cassandra to ScyllaDB as message volume crossed trillions.

design-discord
case-study
messaging-communication
discord
guild-architecture
websocket-gateway
cassandra
scylladb
voice-channels
presence-fan-out
elixir
system-design
advanced
premium

944

21

Hard