Skip to content
Kafka Is FunProgress

Advanced6 min

Unclean Leader Election (Data Loss Demonstration)

Observe how enabling unclean leader election sacrifices data integrity for availability.

Unclean leader election allows a non-ISR replica to become leader when no ISR members are available. This prevents partition downtime but GUARANTEES data loss. This lab demonstrates why you should almost never enable it.

The steps below reference the interactive simulator, which is being migrated into /simulate next — until it lands, treat this as the written runbook for the exercise.

Steps

0 of 6 steps completed

Verification

You observed the difference in behavior with unclean election on vs off. With it off, the partition prefers availability loss over data loss.

The interview angle

NEVER enable unclean leader election for financial data, orders, or any critical stream. It turns Kafka's durability guarantees off. Prefer partition unavailability over silent data loss.