Bird
0
0

How can you combine Kafka AdminClient and ZooKeeper to ensure high availability of controller broker monitoring in a distributed system?

hard📝 Application Q9 of 15
Kafka - Cluster Architecture

How can you combine Kafka AdminClient and ZooKeeper to ensure high availability of controller broker monitoring in a distributed system?

AUse only AdminClient polling; ZooKeeper is not involved in monitoring
BUse AdminClient to get controller ID and ZooKeeper watches to get notified on controller changes
CUse ZooKeeper to elect controller and AdminClient to restart it
DUse AdminClient to manage ZooKeeper nodes directly
Step-by-Step Solution
Solution:
  1. Step 1: Understand roles of AdminClient and ZooKeeper

    AdminClient queries Kafka metadata; ZooKeeper manages cluster state and can notify on changes.
  2. Step 2: Combine both for robust monitoring

    Use AdminClient to get current controller ID and ZooKeeper watches to get notified immediately on changes.
  3. Final Answer:

    Use AdminClient to get controller ID and ZooKeeper watches to get notified on controller changes -> Option B
  4. Quick Check:

    Combine AdminClient polling and ZooKeeper watches for HA monitoring [OK]
Quick Trick: Combine AdminClient and ZooKeeper watches for reliable monitoring [OK]
Common Mistakes:
  • Ignoring ZooKeeper's notification capabilities
  • Assuming AdminClient alone suffices for immediate notifications
  • Misusing AdminClient to manage ZooKeeper nodes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes