0
0
Kafkadevops~20 mins

In-sync replicas (ISR) in Kafka - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Kafka ISR Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
What is the output of the ISR status check command?
Given a Kafka topic with 3 partitions and replication factor 3, you run the command to describe the topic and check the ISR for partition 0. What output will you see if all replicas are in sync?
Kafka
kafka-topics.sh --describe --topic my-topic --bootstrap-server localhost:9092
APartition: 0 Leader: 1 Replicas: 1,2,3 Isr: 1
BPartition: 0 Leader: 1 Replicas: 1,2,3 Isr: 1,2,3
CPartition: 0 Leader: 1 Replicas: 1,2,3 Isr: 2,3
DPartition: 0 Leader: 1 Replicas: 1,2,3 Isr: 1,3
Attempts:
2 left
💡 Hint
ISR includes all replicas that are fully caught up with the leader.
🧠 Conceptual
intermediate
1:30remaining
What happens when a replica falls out of the ISR?
In Kafka, if a follower replica falls behind the leader and cannot keep up, what is the expected behavior regarding the ISR?
AThe ISR size automatically increases to include more replicas.
BThe replica remains in the ISR but stops receiving data.
CThe leader shuts down to prevent data loss.
DThe replica is removed from the ISR until it catches up again.
Attempts:
2 left
💡 Hint
ISR only contains replicas fully caught up with the leader.
🔧 Debug
advanced
2:00remaining
Why does the ISR not include a replica after network partition?
You notice that after a network partition, one replica is no longer listed in the ISR for a partition. Which of the following is the most likely cause?
AThe replica failed to fetch data and fell behind the leader's log.
BThe leader replica crashed and was removed from ISR.
CThe replica was promoted to leader and removed from ISR.
DThe ISR list is fixed and does not update dynamically.
Attempts:
2 left
💡 Hint
ISR updates dynamically based on replica sync status.
📝 Syntax
advanced
1:30remaining
Which command correctly lists the ISR for a Kafka topic?
Select the correct Kafka CLI command to describe a topic and show the ISR for all partitions.
Akafka-topics.sh --describe --topic my-topic --bootstrap-server localhost:9092
Bkafka-consumer-groups.sh --describe --group my-group --topic my-topic
Ckafka-configs.sh --describe --entity-type topics --entity-name my-topic
Dkafka-producer-perf-test.sh --topic my-topic --describe
Attempts:
2 left
💡 Hint
The topic description command shows ISR info.
🚀 Application
expert
2:30remaining
How many replicas are in the ISR after this scenario?
A Kafka topic has replication factor 4. Initially, all replicas are in the ISR: [1,2,3,4]. Replica 3 falls behind due to slow disk and replica 2 loses network connectivity temporarily. After some time, replica 3 catches up but replica 2 is still disconnected. What is the current ISR?
A[1,4]
B[1,2,3,4]
C[1,3,4]
D[3,4]
Attempts:
2 left
💡 Hint
ISR only includes replicas currently caught up and connected.