Bird
Raised Fist0
Kafkadevops~20 mins

Active-passive vs active-active in Kafka - Practice Questions

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Kafka Cluster Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Difference between active-passive and active-active Kafka clusters

Which statement best describes the difference between active-passive and active-active Kafka cluster setups?

AActive-passive clusters require manual failover; active-active clusters never require failover.
BActive-passive clusters share the same data center; active-active clusters are always in different data centers.
CActive-passive has one cluster handling all traffic while the other is standby; active-active has both clusters handling traffic simultaneously.
DActive-passive clusters use multiple brokers; active-active clusters use a single broker.
Attempts:
2 left
💡 Hint

Think about how traffic is handled in each setup.

❓ Predict Output
intermediate
2:00remaining
Output of Kafka consumer group behavior in active-active setup

Given two Kafka clusters in an active-active setup, what will be the output of the following consumer group status command if both clusters consume from the same topic independently?

Kafka
kafka-consumer-groups --bootstrap-server cluster1:9092 --describe --group my-group
kafka-consumer-groups --bootstrap-server cluster2:9092 --describe --group my-group
ANo output because consumer groups cannot exist in active-active setups.
BA single combined consumer group status merging offsets from both clusters.
CAn error indicating consumer group conflicts between clusters.
DTwo separate consumer group statuses showing independent offsets for each cluster.
Attempts:
2 left
💡 Hint

Consider how consumer groups are managed per cluster.

🔧 Debug
advanced
2:00remaining
Why does failover not happen automatically in active-passive Kafka setup?

In an active-passive Kafka cluster setup, the passive cluster does not start handling traffic automatically after the active cluster fails. What is the most likely cause?

AThe passive cluster has no brokers running.
BThe passive cluster is not configured with automatic failover or monitoring tools.
CKafka does not support failover in any cluster setup.
DThe active cluster is still partially responding, so failover is blocked.
Attempts:
2 left
💡 Hint

Think about what triggers failover in active-passive setups.

📝 Syntax
advanced
2:00remaining
Identify the error in Kafka MirrorMaker active-active configuration snippet

What is wrong with this MirrorMaker configuration snippet intended for active-active replication?

Kafka
clusters = clusterA, clusterB
clusterA.bootstrap.servers = kafkaA:9092
clusterB.bootstrap.servers = kafkaB:9092

# Replication flows
clusterA->clusterB.enabled = true
clusterB->clusterA.enabled = false
AThe replication from clusterB to clusterA is disabled, so it's not truly active-active.
BThe bootstrap servers are incorrectly specified with ports.
CThe clusters variable should be a list, not a comma-separated string.
DMirrorMaker does not support active-active replication.
Attempts:
2 left
💡 Hint

Check the replication directions enabled.

🚀 Application
expert
3:00remaining
Choosing cluster setup for global low-latency Kafka access

You need to design a Kafka deployment for a global application requiring low-latency writes and reads from multiple continents. Which setup is best?

AActive-active clusters in multiple regions with bi-directional replication.
BSingle active cluster in one region with passive clusters in others for failover.
CMultiple independent clusters with no replication to reduce complexity.
DActive-passive clusters with manual failover to control traffic.
Attempts:
2 left
💡 Hint

Consider latency and availability for global users.

Practice

(1/5)
1. Which statement best describes an active-passive Kafka cluster setup?
easy
A. One cluster is active handling all traffic, the other is standby for failover.
B. Both clusters actively handle traffic and share the load equally.
C. Clusters are inactive until manually started.
D. Clusters are used only for backup storage without processing.

Solution

  1. Step 1: Understand active-passive setup

    Active-passive means one system is active and the other waits as backup. One cluster is active handling all traffic, the other is standby for failover. matches this exactly: one active, one standby for failover.
  2. Final Answer:

    One cluster is active handling all traffic, the other is standby for failover. -> Option A
  3. Quick Check:

    Active-passive = one active, one standby [OK]
Hint: Active-passive means only one active system at a time [OK]
Common Mistakes:
  • Confusing active-active with active-passive
  • Thinking both clusters handle traffic simultaneously
  • Assuming passive cluster processes data
2. Which Kafka cluster configuration syntax correctly represents an active-active setup?
easy
A. A single cluster with no replication.
B. Two clusters with separate Zookeeper ensembles, both processing data simultaneously.
C. One cluster with a passive standby cluster defined but not processing data.
D. Two clusters where one is always offline.

Solution

  1. Step 1: Identify active-active setup syntax

    Active-active means multiple clusters actively processing data at the same time. Two clusters with separate Zookeeper ensembles, both processing data simultaneously. describes two clusters with separate Zookeeper ensembles both active simultaneously.
  2. Final Answer:

    Two clusters with separate Zookeeper ensembles, both processing data simultaneously. -> Option B
  3. Quick Check:

    Active-active = multiple active clusters [OK]
Hint: Active-active means multiple active clusters running simultaneously [OK]
Common Mistakes:
  • Choosing passive cluster syntax for active-active
  • Ignoring Zookeeper ensemble separation
  • Assuming single cluster can be active-active
3. Given two Kafka clusters configured in active-active mode, what is the expected behavior when a message is produced to both clusters simultaneously?
medium
A. Messages are processed independently and replicated asynchronously between clusters.
B. Only one cluster accepts messages; the other rejects them.
C. Messages are lost if produced to both clusters at the same time.
D. Clusters merge messages automatically without conflicts.

Solution

  1. Step 1: Understand active-active message handling

    In active-active, both clusters accept messages and replicate asynchronously. Messages are processed independently and replicated asynchronously between clusters. correctly states messages are processed independently and replicated asynchronously between clusters.
  2. Final Answer:

    Messages are processed independently and replicated asynchronously between clusters. -> Option A
  3. Quick Check:

    Active-active = independent processing + async replication [OK]
Hint: Active-active clusters replicate asynchronously, handling messages independently [OK]
Common Mistakes:
  • Assuming only one cluster accepts messages
  • Thinking messages get lost on simultaneous produce
  • Believing clusters merge messages automatically
4. You configured a Kafka cluster in active-passive mode but both clusters are processing messages simultaneously. What is the likely cause?
medium
A. Kafka does not support active-passive mode.
B. Passive cluster is offline.
C. Zookeeper ensemble is shared correctly.
D. Failover mechanism is not properly configured, causing both to be active.

Solution

  1. Step 1: Identify expected active-passive behavior

    Only one cluster should be active; the other should be standby. If both are active, failover or coordination is misconfigured, allowing both to process.
  2. Final Answer:

    Failover mechanism is not properly configured, causing both to be active. -> Option D
  3. Quick Check:

    Misconfigured failover = both active [OK]
Hint: Check failover setup if both active in active-passive mode [OK]
Common Mistakes:
  • Assuming Kafka can't do active-passive
  • Ignoring failover configuration
  • Thinking shared Zookeeper means passive is active
5. You want to design a Kafka deployment for a critical application requiring zero downtime and high throughput. Which setup is best and why?
hard
A. Single cluster with no replication, to reduce complexity.
B. Active-passive, because one cluster handles all traffic and the other is backup.
C. Active-active, because multiple clusters share load and provide failover simultaneously.
D. Passive-only clusters to save resources.

Solution

  1. Step 1: Identify requirements

    Zero downtime and high throughput require load sharing and failover. Active-active allows multiple clusters to share load and provide failover simultaneously.
  2. Final Answer:

    Active-active, because multiple clusters share load and provide failover simultaneously. -> Option C
  3. Quick Check:

    High availability + throughput = active-active [OK]
Hint: Active-active suits zero downtime and high throughput needs [OK]
Common Mistakes:
  • Choosing active-passive for high throughput
  • Ignoring failover and load sharing benefits
  • Selecting single cluster risking downtime
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard