Skip to content
SD-19 · DISTRIBUTED MESSAGE QUEUE · INTERACTIVE

Break it.
Then fix it.

Turn up the publish rate, watch the brokers melt, and add the parts a real message queue needs. Every switch is a decision you would defend in an interview.

CHALLENGECarry 1M messages/s with publish p99 under 50 ms, 3 copies of every message, and nothing lost or looping when consumers crash.
StatusSTRAINEDAt 50K messages per second
Publish p998 msTarget under 50 ms
Rejected0%Every publish stored
Copies1A dead disk loses messages
Monthly cost$4501 broker
ProducersLIVE
50K messages/s
traffic source
ConsumersGROUP
Ack after work
65K deliveries/s
BrokerONE COPY
Group commit every 2 ms
70K / 100K appends/s
RedeliveriesPOISON LOOP
Poison retried forever
15K retries/s
One disk holds every message. Producers were told their messages are safe, but a single dead disk would lose them all. Copy each partition to 2 followers in other zones and answer after 2 of 3 have it.
25×From group commit4,000 appends a second with an fsync each; about 100,000 with one fsync per 2 ms batch.
2 of 3Copies before 201Survives any one broker or zone and never waits for the slowest disk.
30 sVisibility timeoutAn unacked message comes back, so a crash means a retry, not a loss.
5Tries, then dead letterA poison message stops wasting consumers and waits for a human.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.