Design Presence And Typing Indicators For Large Slack Workspaces
Last updated: November 29, 2026
Quick Overview
Design the system that shows who is online, away or in a huddle, and who is typing, for workspaces with up to 500,000 members and channels with tens of thousands of members, while keeping client connections and fan-out costs bounded.
Slack
November 29, 20260
0
0 solved
Design the system that shows who is online, away or in a huddle, and who is typing, for workspaces with up to 500,000 members and channels with tens of thousands of members, while keeping client connections and fan-out costs bounded.
Presence is one of the highest-volume and lowest-value-per-event streams at Slack, so naive fan-out to every member of a large Enterprise Grid org would dwarf message traffic. Interviewers use it to test whether you can trade freshness for cost, use subscriptions instead of broadcast, and reason about long-lived WebSocket gateways.
What the Interviewer Expects
- Separate durable state (manual status) from ephemeral state (online, typing)
- Use interest-based subscriptions so clients only receive presence for users they can see
- Quantify fan-out and show why broadcast to all members fails
- Use heartbeats with timeouts and batching or coalescing of updates
- Keep typing indicators lossy and scoped to a channel or thread
- Discuss gateway failover and what clients show during reconnect
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- A 50,000 member announcement channel: should typing indicators exist there at all?
- How do you avoid a thundering herd of presence changes when a gateway region fails?
- How would presence work for a user in a Slack Connect channel owned by another org?
- How do you keep presence correct when the same user has desktop, mobile and web sessions?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: per-user state (active, away, do not disturb, in huddle), custom status, typing in a channel or thread. Non-functional: presence visible within about 5 to 10 s, typing within 1 s, multi-de...
High-Level Design
Clients hold a WebSocket to a gateway fleet. Each gateway sends heartbeats for its sessions to a presence service, sharded by user id, holding in-memory state with TTLs (missing two heartbeats marks t...