An In-sync Replica (ISR) is a Kafka broker that has fully caught up with the leader's data for a partition. It means the replica has all the latest messages and is ready to take over if the leader fails.
Click to reveal answer
beginner
Why is ISR important in Kafka?
ISR ensures data durability and availability. Only replicas in the ISR can be elected as leaders, which guarantees that no data is lost during failover because these replicas have the latest data.
Click to reveal answer
intermediate
How does a replica join or leave the ISR?
A replica joins the ISR when it catches up with the leader's data within a configured time. It leaves the ISR if it falls behind or becomes unresponsive for too long.
Click to reveal answer
intermediate
What happens if all replicas leave the ISR except the leader?
If all replicas leave the ISR except the leader, Kafka cannot guarantee data durability. The leader continues serving data but the risk of data loss increases if it fails before replicas catch up.
Click to reveal answer
advanced
How does Kafka use ISR to maintain consistency?
Kafka only commits messages when all replicas in the ISR have acknowledged them. This ensures that committed data is safely stored on all in-sync replicas, maintaining consistency.
Click to reveal answer
What does ISR stand for in Kafka?
AInternal Sync Resource
BInstant Sync Replication
CIn-sync Replicas
DIndependent Sync Replica
✗ Incorrect
ISR stands for In-sync Replicas, which are replicas fully caught up with the leader.
When does a replica leave the ISR?
AWhen it falls behind or is unresponsive
BWhen it receives new data
CWhen it becomes the leader
DWhen it catches up with the leader
✗ Incorrect
A replica leaves the ISR if it falls behind the leader or becomes unresponsive for too long.
Why does Kafka commit messages only after ISR replicas acknowledge them?
ATo ensure data durability and consistency
BTo reduce network traffic
CTo improve performance
DTo allow replicas to lag
✗ Incorrect
Committing messages after ISR replicas acknowledge ensures data is safely stored and consistent.
What risk increases if only the leader remains in the ISR?
AFaster data replication
BData loss if leader fails
CMore replicas joining ISR
DAutomatic leader election
✗ Incorrect
If only the leader is in ISR, data loss risk increases if the leader fails before replicas catch up.
Which Kafka component decides the ISR membership?
AKafka Producer
BKafka Controller
CKafka Consumer
DKafka Broker Leader
✗ Incorrect
The Kafka Broker Leader (partition leader) manages ISR membership by tracking replica states.
Explain what In-sync Replicas (ISR) are and why they matter in Kafka.
Think about how Kafka keeps data safe and available.
You got /3 concepts.
Describe the process of how a replica joins or leaves the ISR in Kafka.
Consider what makes a replica 'in-sync' or not.
You got /3 concepts.
Practice
(1/5)
1. What does In-sync replicas (ISR) mean in Kafka?
easy
A. Replicas that are offline
B. Replicas that never receive data
C. Replicas that have the latest data from the leader
D. Replicas that only store old data
Solution
Step 1: Understand the role of ISR
ISR are replicas that keep up-to-date with the leader's data.
Step 2: Compare options
Only Replicas that have the latest data from the leader correctly describes ISR as replicas with the latest data.
Final Answer:
Replicas that have the latest data from the leader -> Option C
Quick Check:
ISR = Latest data replicas [OK]
Hint: ISR means replicas fully caught up with leader data [OK]
Common Mistakes:
Thinking ISR includes offline replicas
Confusing ISR with replicas that lag behind
Assuming ISR means replicas with old data
2. Which Kafka configuration controls the minimum number of ISR replicas required to acknowledge a write?
easy
A. replica.fetch.max.bytes
B. min.insync.replicas
C. max.insync.replicas
D. offsets.retention.minutes
Solution
Step 1: Identify configuration related to ISR acknowledgments
The setting min.insync.replicas defines the minimum ISR count for write success.
Step 2: Eliminate unrelated options
Other options control fetch size or retention, not ISR acknowledgments.
Final Answer:
min.insync.replicas -> Option B
Quick Check:
Minimum ISR replicas = min.insync.replicas [OK]
Hint: min.insync.replicas sets minimum ISR for writes [OK]
Common Mistakes:
Confusing min.insync.replicas with max.insync.replicas
Choosing unrelated configs like offsets.retention.minutes
Hint: Error means ISR count < min.insync.replicas [OK]
Common Mistakes:
Blaming leader offline instead of ISR count
Confusing consumer group commit with ISR errors
Thinking zero partitions cause this error
5. You want to ensure high availability in Kafka by allowing leader failover only if at least 2 replicas are in ISR. Which configuration and setup achieve this?
hard
A. Set min.insync.replicas=2 and have at least 3 replicas per partition
B. Set min.insync.replicas=1 and have 2 replicas per partition
C. Set min.insync.replicas=3 with 2 replicas per partition
D. Set min.insync.replicas=0 and 1 replica per partition
Solution
Step 1: Understand min.insync.replicas meaning
This setting defines the minimum ISR count required for leader failover and write success.
Step 2: Match configuration to requirement
To require at least 2 ISR replicas, set min.insync.replicas=2 and have at least 3 replicas to allow failover.
Final Answer:
Set min.insync.replicas=2 and have at least 3 replicas per partition -> Option A
Quick Check:
High availability needs min.insync.replicas=2 with 3 replicas [OK]
Hint: min.insync.replicas ≤ replica count for failover [OK]
Common Mistakes:
Setting min.insync.replicas higher than replica count
Using too few replicas for desired availability
Setting min.insync.replicas to zero disables safety
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.