HLD-313·Messaging & Queues
Hard · 1,500 ptsPartitioned Commit-Log Message Queue & Offset Coordinator
Design an Apache Kafka / AWS SQS distributed streaming broker supporting high-throughput partitioned appends, consumer-group offset commits, and leader failover.
Max p99
≤ 55 ms
Availability
≥ 99.5%
Budget
≤ $8,600
Functional Requirements
- FR-1POST /topics/{topic_partition}/produce — Appends ordered record batch with quorum ISR replication.
- FR-2GET /topics/{topic_partition}/fetch?offset=... — Serves sequential page-cache consumer reads.
- FR-3PATCH & DELETE /topics/{topic_partition}/produce — Updates, cancels, or deletes topic_partition records and immediately invalidates or updates cached state (read-after-write).
- FR-4Must preserve committed offsets and sequential read-after-write visibility across broker crashes.
Workload Profile
Steady Event Bus46,000 Consumer Fetch RPS / 16,000 Produce Batch RPS
Backfill & Replay Storm125,000 Fetch RPS / 34,000 Produce RPS
Active Working Set40 GB hot OS page-cache tail segments & consumer offsets
Durability GateISR quorum replication + monotonic partition offsets
Consistency Model
Read-after-write high-watermark visibility per topic_partition; committed records survive broker crash.
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