---
title: "Kafka split-brain: what a network partition does to leaders"
description: "A network split cuts leader broker-1 off from the Kafka controller, which fences it and elects broker-2 from the ISR. The old leader can no longer commit."
url: https://monedula.dev/kafka-simulator/scenarios/network-partition-split-brain/
---

# Kafka split-brain: what a network partition does to leaders

Scenario 08.0.2 · Network partition: split-brain. Chaos · Intermediate · about 3 min · Apache Kafka 4.3.

A network split cuts the leader off from the controller. The controller fences it and elects a new leader from the reachable ISR, so the isolated old leader can no longer commit writes - no split-brain.

Run it: https://monedula.dev/kafka-simulator/playground/?scenario=08.0.2

## What you start with

A network partition is subtler than a crash - no broker dies, but the cluster is cut into groups that cannot see each other. Kafka prevents split-brain through the controller, not a majority of replicas: the KRaft controller fences a broker it can no longer hear from and elects the new leader from the live ISR, bumping the leader epoch. Here the split cuts the old leader off from the controller, and you watch leadership move to the side that can still reach it.

## Step by step

1. **Healthy cluster** (t+1.000s): Three brokers, RF=3, min.ISR=2. broker-1 leads; the network is whole. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=08.0.2&t=0)
2. **O1,O2 committed** (t+5.000s): O1,O2 commit on all three replicas (HW=2). [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=08.0.2&t=1)
3. **Split: isolated leader is fenced** (t+9.000s): The network splits into {broker-1} and {broker-2, broker-3}. broker-1 was the leader but can no longer reach the controller quorum, so the controller fences it and elects broker-2 from the ISR (epoch→1). broker-1 cannot commit acks=all writes without its followers; the simulator shows it serving nothing at all. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=08.0.2&t=2)
4. **Healed** (t+13.000s): The link is restored. broker-1 rejoins as a follower under leader broker-2 and re-enters the ISR. Because only one side ever had a leader, there is nothing to reconcile. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=08.0.2&t=3)

## The takeaway

Only one leader can commit after a split because the controller elects from the ISR it can reach and bumps the leader epoch; the isolated old leader cannot advance its high watermark, and anything it took with acks=1 is truncated when it rejoins.

## Configs in this scenario

- [`min.insync.replicas`](https://kafka.apache.org/43/configuration/topic-configs/#topicconfigs_min.insync.replicas): The fewest in-sync replicas, leader included, that must have a write for an acks=all produce to succeed (default 1); with fewer in the ISR the leader rejects the write with NOT_ENOUGH_REPLICAS. [How min.insync.replicas works](https://monedula.dev/kafka-simulator/configs/min-insync-replicas/)
- [`acks`](https://kafka.apache.org/43/configuration/producer-configs/#producerconfigs_acks): How many replicas must have a write before the producer counts it as sent: 0 (none), 1 (the leader only) or all (every in-sync replica, the default, and required for idempotence). [How acks works](https://monedula.dev/kafka-simulator/configs/acks/)

## Further reading

- [Apache Kafka documentation](https://kafka.apache.org/43/operations/kraft/)
