1,200,000 Messages/sec Peak
Sustained peak request volume during high-traffic events.
Scale a real-time messaging pipeline for 500M daily active users with message delivery receipts.
Target production parameters expected in a senior or staff interview round.
Sustained peak request volume during high-traffic events.
Daily active users generating read and write operations.
Projected data ingestion and replication storage capacity.
Strict end-to-end percentile latency SLA constraint.
Establish clear problem boundaries before proposing architectural components.
Step-by-step arithmetic conversions for QPS, storage, and bandwidth.
| Dimension | Calculation Formula | Estimated Result |
|---|---|---|
| Message Volume | 500M DAU × 100 messages/day = 50B messages/day | ~580,000 avg msg/sec (~1.2M Peak msgs/sec) |
| Daily Message Storage | 50B messages × 1 KB average metadata and text payload | ~50 Terabytes / day |
| Concurrent WebSocket Connections | 500M DAU with 20% concurrent peak = 100M simultaneous sockets | 100M open TCP/TLS connections |
How requests navigate ingress gateways, application logic, caching, and persistence.
Maintains persistent bi-directional TLS WebSocket connections with active client apps.
Tracks which server host ID holds the open socket for each active user UUID.
Buffers messages, coordinates push notifications for offline users, and writes to disk.
Entity models, indexing, and primary key partitioning.
Clustered by message_id descending for fast historical pagination.
How to defend engineering compromises when challenged by interviewers.
Rationale: WebSockets provide lowest latency bi-directional messaging with single TLS handshake.
Rationale: Cassandra provides horizontal write scalability and natural partitioning by conversation_id.
Key interview questions and conceptual defenses.
Instead of fanout-on-write to 500 separate user inboxes, use a single conversation stream where participants fetch updates based on their read cursor.