leader epoch
A counter per partition that goes up by one every time a new leader is elected.
In more detail
Comparing the epoch before and after a broker failure tells you which partitions changed leader. Replicas also use it to discard stale data from an old leader.
Related terms
- leader election — The process by which the members of a distributed system choose one of themselves to act as leader.
- partition leader — The replica of a partition that handles all reads and writes for it; the other replicas copy from it.
- rpk topic describe — An rpk command that shows a topic's summary, its configuration with -c, or its partition table with -p.
- fencing — Cutting a failed or doubtful member of a replicated system off from its data so it cannot keep writing while you recover.
- split brain — A failure in which two nodes both believe they are the leader and both accept writes.
Taught in
- The Retry That Overtook — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Two Copies Of One Service — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Two Hours Of Scans At Once — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Forty Minutes To Start — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Three Brokers: Replication And Leaders — Apache Kafka & Event Streaming
- Losing A Broker — Apache Kafka & Event Streaming
- Replication, Failover And Leader Election — Scalable System Design & Distributed Architecture
References
- Apache Kafka design: replication
- rpk topic describe
- Patterns of Distributed Systems: Generation Clock
- Ongaro and Ousterhout: In Search of an Understandable Consensus Algorithm (Raft)