<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/eligible-leader-replicas-elr-in-kafka-4-1-what-you-need-to-know-0e0n2w9ky" -->

---
title: Eligible Leader Replicas (ELR) in Kafka 4.1: What You...
description: KIP-966 introduces Eligible Leader Replicas (ELR) in Apache Kafka 4.1 to fix the rare but critical 'Last Replica Standing' scenario where committed messages...
canonical: https://daily.dev/posts/eligible-leader-replicas-elr-in-kafka-4-1-what-you-need-to-know-0e0n2w9ky
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Eligible Leader Replicas (ELR) in Kafka 4.1: What You Need to Know | daily.dev
og:description: KIP-966 introduces Eligible Leader Replicas (ELR) in Apache Kafka 4.1 to fix the rare but critical 'Last Replica Standing' scenario where committed messages...
og:url: https://daily.dev/posts/eligible-leader-replicas-elr-in-kafka-4-1-what-you-need-to-know-0e0n2w9ky
og:image: https://api.daily.dev/og/posts/0e0n2w9kY.png
og:image:alt: Eligible Leader Replicas (ELR) in Kafka 4.1: What You Need to Know
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Eligible Leader Replicas (ELR) in Kafka 4.1: What You Need to Know

**[SoftwareMill](https://daily.dev/sources/softwaremill)** · 12 min read · 1 upvotes · 0 comments

## Summary

KIP-966 introduces Eligible Leader Replicas (ELR) in Apache Kafka 4.1 to fix the rare but critical 'Last Replica Standing' scenario where committed messages could be lost even with acks=all. ELR creates a middle-ground replica state between ISR and fully untrusted replicas: when the ISR drops below min.insync.replicas, replicas that held data up to the frozen High Watermark are tracked in the ELR list and remain safe leader candidates. The fix also includes a High Watermark advance rule change (HWM only advances when ISR >= min.insync.replicas, regardless of producer acks setting) and improved unclean shutdown detection via CleanShutdownFile epoch checks. Consumers will notice that a degraded ISR now freezes consumption visibility, not just production durability. ELR is experimental in Kafka 4.0 and enabled by default in 4.1 (KRaft only).

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://softwaremill.com/eligible-leader-replicas-elr-in-kafka-4-1-what-you-need-to-know>

## Questions this post answers

### What is the Last Replica Standing issue in Kafka and how can it cause data loss even with acks=all?

It occurs when an unclean shutdown hits the broker holding the only remaining in-sync replica (ISR) after other replicas dropped out due to transient issues like network partitions. Because that broker loses unflushed page-cache data but is still treated as the sole source of truth, it gets re-elected leader, forcing healthy replicas with fully committed data to truncate their correct logs to match it.

_Track Kafka reliability fixes like this on daily.dev before an edge case bites your production cluster._

### What changed with Eligible Leader Replicas (ELR) in Kafka 4.1 compared to Kafka 4.0?

ELR was introduced as experimental in Kafka 4.0 and became the default behavior in Kafka 4.1, applying only to KRaft clusters, not ZooKeeper. ELR adds a middle state between ISR and untrusted replicas, tracking replicas removed from ISR that still hold data up to the high watermark, so they remain safe leader candidates even after being fenced or partitioned.

_Follow Kafka version-specific behavior changes on daily.dev to plan upgrades with confidence._

### How does KIP-966 change when the Kafka High Watermark is allowed to advance?

After KIP-966, the high watermark can only advance when the ISR size is greater than or equal to min.insync.replicas, regardless of a producer's acks setting. Previously, acks=1 or acks=0 producers could keep advancing the HWM even when ISR fell below min.insync.replicas, which risked the HWM jumping backward if a degraded leader was later replaced.

_daily.dev helps engineers weighing Kafka durability trade-offs stay current on protocol-level fixes like this._

## Similar posts on daily.dev

- [Data liberation: Apache Kafka's native cluster mirroring](https://daily.dev/posts/data-liberation-apache-kafka-s-native-cluster-mirroring-ifrpssbjm) · Red Hat Developer · 0 upvotes · 0 comments
- [Apache Kafka Replica Followers: Synchronous or Asynchronous?](https://daily.dev/posts/apache-kafka-replica-followers-synchronous-or-asynchronous--hnvn4k0ak) · SoftwareMill · 4 upvotes · 0 comments
- [Understanding in-sync replicas and replication factor in Confluent Stretched Cluster 2.5](https://daily.dev/posts/understanding-in-sync-replicas-and-replication-factor-in-confluent-stretched-cluster-2-5-ssa0wwvwh) · SoftwareMill · 1 upvotes · 0 comments
- [Apache Kafka 4.3 released: 25 KIPs, Kafka Streams, Share Group Controls, Broker Isolation, and more](https://daily.dev/posts/apache-kafka-4-3-released-25-kips-kafka-streams-share-group-controls-broker-isolation-and-more-thqzbnvv6) · Confluent Blog · 2 upvotes · 0 comments

---

Tags: [#distributed-systems](https://daily.dev/tags/distributed-systems), [#data-engineering](https://daily.dev/tags/data-engineering), [#apache-kafka](https://daily.dev/tags/apache-kafka)

[View this post on daily.dev](https://daily.dev/posts/eligible-leader-replicas-elr-in-kafka-4-1-what-you-need-to-know-0e0n2w9ky)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Eligible Leader Replicas (ELR) in Kafka 4.1: What You Need to Know","url":"https://daily.dev/posts/eligible-leader-replicas-elr-in-kafka-4-1-what-you-need-to-know-0e0n2w9ky","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/eligible-leader-replicas-elr-in-kafka-4-1-what-you-need-to-know-0e0n2w9ky"},"datePublished":"2026-07-24T13:15:28.426Z","dateModified":"2026-09-14T08:21:34.781Z","description":"KIP-966 introduces Eligible Leader Replicas (ELR) in Apache Kafka 4.1 to fix the rare but critical 'Last Replica Standing' scenario where committed messages...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/36a8db2c69aabadce1922cf94df41821?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/36a8db2c69aabadce1922cf94df41821?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"SoftwareMill","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"SoftwareMill","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/30827c94697f47fcbc88ff9b59fa226f","url":"https://daily.dev/sources/softwaremill"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/eligible-leader-replicas-elr-in-kafka-4-1-what-you-need-to-know-0e0n2w9ky","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"distributed-systems,data-engineering,apache-kafka","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"SoftwareMill","item":"https://daily.dev/sources/softwaremill"},{"@type":"ListItem","position":3,"name":"Eligible Leader Replicas (ELR) in Kafka 4.1: What You Need to Know"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/eligible-leader-replicas-elr-in-kafka-4-1-what-you-need-to-know-0e0n2w9ky#faq","mainEntity":[{"@type":"Question","name":"What is the Last Replica Standing issue in Kafka and how can it cause data loss even with acks=all?","acceptedAnswer":{"@type":"Answer","text":"It occurs when an unclean shutdown hits the broker holding the only remaining in-sync replica (ISR) after other replicas dropped out due to transient issues like network partitions. Because that broker loses unflushed page-cache data but is still treated as the sole source of truth, it gets re-elected leader, forcing healthy replicas with fully committed data to truncate their correct logs to match it. Track Kafka reliability fixes like this on daily.dev before an edge case bites your production cluster."}},{"@type":"Question","name":"What changed with Eligible Leader Replicas (ELR) in Kafka 4.1 compared to Kafka 4.0?","acceptedAnswer":{"@type":"Answer","text":"ELR was introduced as experimental in Kafka 4.0 and became the default behavior in Kafka 4.1, applying only to KRaft clusters, not ZooKeeper. ELR adds a middle state between ISR and untrusted replicas, tracking replicas removed from ISR that still hold data up to the high watermark, so they remain safe leader candidates even after being fenced or partitioned. Follow Kafka version-specific behavior changes on daily.dev to plan upgrades with confidence."}},{"@type":"Question","name":"How does KIP-966 change when the Kafka High Watermark is allowed to advance?","acceptedAnswer":{"@type":"Answer","text":"After KIP-966, the high watermark can only advance when the ISR size is greater than or equal to min.insync.replicas, regardless of a producer's acks setting. Previously, acks=1 or acks=0 producers could keep advancing the HWM even when ISR fell below min.insync.replicas, which risked the HWM jumping backward if a degraded leader was later replaced. daily.dev helps engineers weighing Kafka durability trade-offs stay current on protocol-level fixes like this."}}]}
```

