Broker Failover, Minute by Minute
Setup: 3 brokers (B1=leader, B2=ISR, B3=ISR), rf=3, min.isr=2, acks=all
| Time | Event | What Kafka does | Impact on producers | Impact on consumers |
|---|---|---|---|---|
| T+0 | B1 crashes | KRaft/ZK detects missing heartbeat | NotLeaderForPartitionException | Fetch disconnect |
| T+10s | Election begins | Controller selects new leader from ISR | — | — |
| T+10–15s | B2 elected | Controller writes metadata, propagates | Producers retry → B2 | Reconnect to B2 |
| T+15–20s | Reconnect | Producers resume with acks=all to B2 | Latency spike | Lag stabilizes |
| T+20s | B3 catches up | ISR restored to {B2, B3} | Normal throughput | — |
| T+?? | B1 restarts | B1 rejoins as follower, truncates to HW | No impact | No impact |
What did NOT happen: no data loss, no consumer rebalance, no EOS transaction abort (unless producer had open transaction at T+0).