Ensuring high availability when a Kafka broker fails unexpectedly comes down to configuring replication and acknowledgment settings ahead of time so the cluster can automatically fail over without data loss.
With replication factor 3 and min.insync.replicas=2, if one broker in the cluster crashes unexpectedly, the controller promotes an in-sync replica on another broker to leader within seconds, and producers using acks=all continue writing without any data loss.
# Which partitions lost a replica when the broker died?
kafka-topics.sh --bootstrap-server localhost:9092 --describe --under-replicated-partitions
Topic: orders Partition: 4 Leader: 2 Replicas: 3,2,1 Isr: 2,1
# After the broker is back and has caught up, move leadership back
# to the preferred replicas so load is balanced again
kafka-leader-election.sh --bootstrap-server localhost:9092 \
--election-type preferred --all-topic-partitionsA concise interview answer is
High availability comes from planning ahead — replication factor of at least 3, min.insync.replicas set to enforce durability, and acks=all on producers — so that when a broker does fail unexpectedly, the controller can automatically elect a new leader from the in-sync replicas with no manual intervention and no data loss.
Last updated: 1 November 2026
Previous question: How would you handle a situation where your Kafka consumer group is significantly lagging behind in consuming messages?
Next question: How do you ensure data consistency when multiple consumers are reading from the same Kafka topic?