Design the architecture for Slack - the leading enterprise communication platform with 30+ million daily active users across 750,000 organizations. Your design must cover:
- Channels & DMs - public channels, private channels, multi-person DMs. Each workspace can have 100,000+ channels. Messages support rich text, code blocks, emoji reactions, and threading.•Real-time messaging - messages appear on all connected clients within 500 ms. Users can be connected on desktop, mobile, and web simultaneously. Typing indicators and presence (online/away/DND) update in real time.•Threads - threaded replies to messages, with a "Threads" view aggregating all threads you're participating in. Threads reduce noise in busy channels.•Search - full-text search across all messages a user has access to, with filters (in:channel, from:user, has:link, before:date). Results must respect permissions - users only see messages from channels they belong to. Returns results in < 1 second.•File & app integrations - share files (up to 1 GB), integrate with 2,500+ third-party apps (Jira, GitHub, Google Calendar). Slash commands and bot users.•Notifications - smart notifications: don't notify for every message in a busy channel, but always notify for DMs and @mentions. Badge counts update in real time.•Enterprise features - SSO (SAML/OIDC), data retention policies, eDiscovery exports, DLP scanning, audit logs, and Enterprise Key Management (EKM).
The key challenge is real-time delivery + search + compliance at enterprise scale.
Design Slack's team communication platform - channels, threads, search, file sharing, integrations, and enterprise compliance at 30 M+ DAU. Build this architecture under realistic production constraints, then validate tradeoffs in the design lab simulation.
Request path: The solution keeps ingress, service logic, and stateful dependencies separated so each layer can scale independently.
Reference flow: Web Clients -> Load Balancer -> API Gateway -> Core Service -> Auth Service -> Primary NoSQL DB -> Realtime Bus -> Search Index