Apache Kafka Streaming (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
What is the In-Sync Replicas (ISR) list and how does `min.insync.replicas` prevent data loss?
junior LevelCode ExampleApache Kafka
In Simple Words:
- ISR (In-Sync Replicas): The subset of partition replicas that are actively caught up with the leader's commit log (within
replica.lag.time.max.ms, default 30s). min.insync.replicas: A topic-level setting that defines the minimum number of replicas that must acknowledge a write when produceracks=all.- The Production Golden Standard for Zero Data Loss:
If 2 out of 3 brokers crash and only 1 broker remains alive, the remaining broker refuses producer writes and throwsproperties
replication.factor = 3 acks = all (or -1) min.insync.replicas = 2NotEnoughReplicasException, preventing silent data divergence!