---
title: "KIP-966 explained: Eligible Leader Replicas (ELR)"
description: "KIP-966 in plain words: how Kafka finds a safe new leader when the ISR is empty, instead of choosing between an offline partition and data loss."
url: https://monedula.dev/kafka/kips/kip-966/
---

# KIP-966: Eligible Leader Replicas, a safe leader when the ISR is empty

Cluster and operations · Shipped · since Kafka 4.0 · status checked November 2026.

KIP-966 lets Kafka elect a safe leader in cases where it used to have none. Because the high watermark only moves while the ISR has at least min.insync.replicas members, a replica that dropped out of the ISR at that point still holds every committed record. The controller now tracks those replicas as eligible leaders and can elect one when the ISR is empty.

## At a glance

- Proposal: KIP-966, Eligible Leader Replicas
- Status: Shipped. Preview in Kafka 4.0; on by default for clusters created with 4.1 or later.
- Area: Cluster and operations
- Proposal page: [KIP-966 on the Apache Kafka wiki](https://cwiki.apache.org/confluence/display/KAFKA/KIP-966%3A+Eligible+Leader+Replicas)

## Why it was needed

When every ISR member was gone, Kafka had two bad options: keep the partition offline until an ISR member came back, or allow an unclean election and lose committed records. Yet often a replica that had just left the ISR was perfectly up to date; Kafka simply did not know it was safe.

## What it changes

The controller stores, per partition, the replicas that left the ISR while it was below min.insync.replicas: the Eligible Leader Replicas. Election order becomes ISR first, then a live eligible replica, then the last known leader. ELR also makes min.insync.replicas a cluster-level setting, so a broker-level value can no longer be changed.

## How to use it

- Clusters created with Kafka 4.1 or later have it on. On an upgraded cluster enable the eligible.leader.replicas.version=1 feature with kafka-features.sh; downgrading to 0 is safe.
- Watch the ElectionFromEligibleLeaderReplicasPerSec metric to see it at work.

## Where it stands

Part one shipped as a preview in Kafka 4.0 and is enabled by default on new clusters since Kafka 4.1. The unclean recovery part of the KIP, a smarter replacement for unclean leader election, has not shipped.

## What comes next

The remaining work is unclean recovery: a strategy for picking the replica with the most data when no safe one is left. Deprecating unclean.leader.election.enable waits on it.

## See it in the simulator

- [Kafka Eligible Leader Replicas (KIP-966) in action](https://monedula.dev/kafka-simulator/scenarios/eligible-leader-replicas/) (Eligible leader replicas (KIP-966)), step 6: broker-2 elected from the ELR - clean, no data loss. The ISR is empty, so the controller picks an unfenced ELR member: broker-2 leads with HW 5, every committed record intact. The stale broker-3 (LEO 2) is never a candidate, and broker-1 stays in the ELR while it is down. Writes still wait: the ISR (broker-2 alone) is below min.ISR, so acks=all produces fail with NOT_ENOUGH_REPLICAS. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=03.2.6&t=5)
- [Kafka unclean leader election: permanent loss of acked data](https://monedula.dev/kafka-simulator/scenarios/unclean-election-data-loss/) (Unclean election: permanent data loss), step 5: broker-2 killed - stale broker-3 promoted UNCLEAN, committed records lost. ISR is empty and the only live replica is the stale broker-3 (LEO 2). Unclean election promotes it anyway: the high-watermark drops from 5 to 2. The three records the producer was told were committed (2-4) are gone - availability bought with a permanent consistency hole. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=03.2.4&t=4)
- [Watch Kafka unclean.leader.election.enable in a simulation](https://monedula.dev/kafka-simulator/scenarios/unclean-leader/) (Unclean leader), step 5: broker-2 killed - partition OFFLINE. ISR is empty. With unclean election disabled, Kafka refuses to promote the stale broker-3: durable, but unavailable. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=03.2.3&t=4)

Scenario 03.2.6 turns ELR on and shows a replica outside the ISR elected with no data loss; 03.2.4 and 03.2.3 show the dilemma without it. ELR is on only in that scenario: free play and the others keep the pre-4.1 rules. The simulator picks the first live ELR member in assignment order, treats a hard kill as an unclean shutdown, and leaves out the last-known-leader step.

## Sources

- [KIP-966: Eligible Leader Replicas](https://cwiki.apache.org/confluence/display/KAFKA/KIP-966%3A+Eligible+Leader+Replicas)
- [Apache Kafka 4.4: Eligible Leader Replicas](https://kafka.apache.org/44/operations/eligible-leader-replicas/)

## Related KIPs

- [KIP-101 explained: leader epochs and log truncation](https://monedula.dev/kafka/kips/kip-101/)
- [KIP-500 explained: KRaft replaces ZooKeeper](https://monedula.dev/kafka/kips/kip-500/)
