HLD-311·Messaging & Fan-out
Hard · 1,500 pts10M-Concurrent User Presence Heartbeat & Guild Fan-Out
Design Discord / Slack’s real-time online/idle/DND presence system handling millions of WebSocket heartbeats and large-server member-list status subscriptions.
Max p99
≤ 50 ms
Availability
≥ 99.5%
Budget
≤ $8,500
Functional Requirements
- FR-1POST /presence/{guild_id}/heartbeat — Updates user online status TTL and broadcasts state transitions.
- FR-2GET /presence/{guild_id}/snapshot — Serves active online roster for newly opened guild channels.
- FR-3PATCH & DELETE /presence/{guild_id}/heartbeat — Updates, revokes, or deletes guild_id entries with bounded TTL or explicit cache/index invalidation.
- FR-4Must absorb massive gaming-launch guild spikes and survive 6x storage brownouts without heartbeat storms.
Workload Profile
Baseline Guilds55,000 Roster Read RPS / 14,000 Heartbeat Write RPS
Game Launch Mega-Guild Peak148,000 Read RPS / 32,000 Write RPS
Active Working Set36 GB guild presence bitmaps & session leases
Contention ProfileExtreme hotspot on 500k-member official guild_id servers
Consistency Model
Bounded eventual presence propagation (< 5s) across large guilds using windowed batching.
Solutions Locked
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Loading solutions...
Submission History (0)Select to replay
No submissions yet
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Design Write-up
0 boxes · 0 edges
0 words