Challenge - 5 Problems
Kafka Multi-Datacenter Availability Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Why does multi-datacenter deployment improve Kafka availability?
In a Kafka setup spanning multiple datacenters, what is the main reason availability is improved?
Attempts:
2 left
💡 Hint
Think about what happens if one datacenter goes offline.
✗ Incorrect
Multi-datacenter Kafka setups replicate data across locations. This means if one datacenter fails, other datacenters still have the data and can serve clients, ensuring availability.
❓ Predict Output
intermediate2:00remaining
What is the output when a Kafka consumer reads from a multi-datacenter cluster after one datacenter fails?
Assume a Kafka cluster with two datacenters replicating topic data. The consumer reads from the cluster. If datacenter 1 goes down, what will the consumer output?
Kafka
records = consumer.poll(timeout_ms=1000) print(records)
Attempts:
2 left
💡 Hint
Think about data replication and failover.
✗ Incorrect
Because data is replicated, the consumer can read from the surviving datacenter without interruption.
🔧 Debug
advanced2:00remaining
Identify the cause of availability loss in a multi-datacenter Kafka setup
Given a Kafka cluster with two datacenters replicating data, the system loses availability when datacenter 1 fails. What is the most likely cause?
Attempts:
2 left
💡 Hint
Check replication settings.
✗ Incorrect
If replication factor is 1, data exists only in one datacenter. Losing that datacenter causes data unavailability.
📝 Syntax
advanced2:00remaining
Which Kafka topic configuration ensures data replication across datacenters?
Select the correct topic creation command that sets replication factor to 3 for multi-datacenter availability.
Kafka
kafka-topics --create --topic my-topic --partitions 3 --replication-factor ? --bootstrap-server kafka1:9092
Attempts:
2 left
💡 Hint
Replication factor must be greater than 1 for replication.
✗ Incorrect
Replication factor 3 means data is copied to 3 brokers, which can be in different datacenters for availability.
🚀 Application
expert2:00remaining
How to configure Kafka producer for multi-datacenter availability?
Which producer configuration ensures messages are acknowledged only after replication to all datacenters?
Attempts:
2 left
💡 Hint
Check Kafka acks settings for replication guarantees.
✗ Incorrect
Setting acks=all means the producer waits for all replicas to acknowledge, ensuring data is replicated across datacenters before confirming.