Bird
0
0

You want to implement a custom leader election strategy in Kafka that prefers brokers with the lowest latency. Which Kafka feature should you extend or modify?

hard📝 Application Q8 of 15
Kafka - Cluster Architecture
You want to implement a custom leader election strategy in Kafka that prefers brokers with the lowest latency. Which Kafka feature should you extend or modify?
ALeader election algorithm in the controller
BController election protocol
CPartition assignment strategy
DProducer partitioner logic
Step-by-Step Solution
Solution:
  1. Step 1: Identify where leader election logic resides

    The controller manages leader election algorithm for partitions.
  2. Step 2: Understand other options

    Partition assignment and producer partitioner relate to data distribution, not leader election.
  3. Final Answer:

    Leader election algorithm in the controller -> Option A
  4. Quick Check:

    Custom leader election = modify controller algorithm [OK]
Quick Trick: Modify controller's leader election algorithm for custom logic [OK]
Common Mistakes:
  • Confusing partition assignment with leader election
  • Thinking producer partitioner affects leader election
  • Assuming controller election protocol is for brokers only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes