When a Kafka partition leader fails, Kafka detects the failure and promotes one of the partition's in-sync replicas to become the new leader so reads and writes can continue with minimal disruption.
If the broker hosting the leader for partition 2 of the "payments" topic crashes, a follower already in the ISR is promoted to leader within seconds, and producers writing to that partition experience only a brief retryable error before continuing normally.
# Broker settings that make leader failover safe
unclean.leader.election.enable=false # only in-sync replicas can become leader
min.insync.replicas=2
default.replication.factor=3
# Producer settings so a leader change is just a retry, not a failure
acks=all
enable.idempotence=true
retries=2147483647
delivery.timeout.ms=120000
# See the new leader after a failover
kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic paymentsA concise interview answer is
When a partition leader fails, the controller elects a new leader from the in-sync replicas, and clients transparently discover and switch to it; with unclean leader election disabled, Kafka favors consistency and only promotes replicas that were fully caught up, even if that means a brief unavailability.
Last updated: 1 November 2026
Previous question: What are the key metrics you would monitor to ensure optimal Kafka cluster performance, and how would you troubleshoot issues like throughput drops?