Slack is a workplace messaging platform that enables users to exchange direct messages and create topic-based group channels. Users can share text and media, with notifications delivered in real time across multiple devices.
We are designing the core messaging layer: direct messages between two users and group channels whose membership can range from a few people to tens of thousands. The central challenge is that small conversations benefit from eager push delivery for a real-time feel, while per-message push in massive channels is prohibitively expensive and requires a fundamentally different approach.
Out of scope (below the line)
200ms for DMs and small channels, and within 500ms for large channels.99.9% uptime for the message send path. Sends always succeed even if some delivery paths degrade.50M daily active users, approximately 1B messages per day, with channels ranging from 2 members (DM) to 100K+ members.| Metric | Value | Drives |
|---|---|---|
| Daily active users (DAU) | 50M | Sizes the WebSocket connection fleet |
| Messages per day | ~1B | Confirms write-heavy workload needs Cassandra-class throughput |
| Messages per second (avg) | ~12K | Sizes the message service and storage write path |
| Peak messages per second | ~50K (burst) | Confirms need for horizontal scaling on the write path |
| Concurrent WebSocket connections | ~10M (20% of DAU online) | Sizes the WebSocket gateway fleet |
| Average message size | ~500 bytes text + metadata | Storage: ~500 GB/day raw messages |
| Channel size range | 2 (DM) to 100K+ | Defines the push vs. pull delivery threshold |
The connection count confirms that a single server cannot hold all WebSocket connections. A fleet of gateway servers is required, with a routing layer to deliver messages to the correct server. The message volume confirms that the storage layer must handle sustained high write throughput, making Cassandra a natural fit for the message log. The channel size range is the most consequential number: delivering to a 5-person DM is fundamentally different from delivering to a 100K-member announcement channel, and the architecture must handle both.
Slack Real-Time Messaging Architecture