Code RoomFlapping partition leadership
HardPrep Room Coding #2459

Flapping partition leadership

On-callNetworking & APIsDistributed systemsSenior–Staff~45 min

Your Kafka-style streaming cluster (and its coordination layer) sits across three AZs. Starting 02:15 you get intermittent connectivity loss between one AZ and the other two — packets drop for 10–30 seconds, recover, then drop again (a flapping partition, not a clean cut). Dashboards: leader elections are firing repeatedly; partition leadership keeps moving; consumer lag oscillates wildly; producer error rate spikes during each flap. CPU/disk are fine. Recent context: a cloud-provider networking incident is in progress for that AZ. How do you triage and mitigate?

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

0:00 of about 45 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.