Bird
0
0

Consider a Kafka cluster with two datacenters and replication factor 2. What is the expected behavior if datacenter A becomes unreachable?

medium📝 Predict Output Q4 of 15
Kafka - Multi-Datacenter and Replication
Consider a Kafka cluster with two datacenters and replication factor 2. What is the expected behavior if datacenter A becomes unreachable?
AKafka continues serving reads and writes from datacenter B
BAll writes are blocked until datacenter A recovers
CData is lost permanently from datacenter A
DKafka automatically reduces replication factor to 1
Step-by-Step Solution
Solution:
  1. Step 1: Understand replication factor

    Replication factor 2 means data is stored in both datacenters.
  2. Step 2: Failure of one datacenter

    Since data exists in datacenter B, Kafka can continue operations there.
  3. Final Answer:

    Kafka continues serving reads and writes from datacenter B -> Option A
  4. Quick Check:

    Replication ensures availability despite one datacenter failure [OK]
Quick Trick: Replication factor 2 allows failover to surviving datacenter [OK]
Common Mistakes:
MISTAKES
  • Assuming writes block immediately after one datacenter fails
  • Believing replication factor changes automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes