CCDAK practice question 17 of 25
There are 3 producers writing to a topic with 5 partitions. There are 5 consumers consuming from the topic. How many Controllers will be present in the cluster?
Full set: 150 questionsIn any Apache Kafka cluster, there is always exactly one active Controller. The Controller is a specific broker that is elected from the pool of live brokers in the cluster. Its primary responsibility is to manage the state of the cluster, including partitions, replicas, and handling broker failures. The number of producers, consumers, topics, or partitions has no influence on the number of active Controllers. This architectural design ensures a single point of responsibility for cluster-wide administrative tasks, preventing split-brain scenarios.
A. 3: This number corresponds to the producers in the scenario and is irrelevant to the number of controllers, which is a fixed architectural constant.
B. 5: This number corresponds to the partitions and consumers and does not determine the number of controllers.
C. 2: This is an arbitrary number; a Kafka cluster is designed to have only a single active controller, not two.
1. Confluent Documentation, "Apache Kafka® Architecture": Under the "Controller" section, it states, "One of the brokers in the cluster is designated as the controller. The controller is responsible for administrative operations, including creating, deleting, and altering topics, as well as managing broker membership and reassigning partitions." This confirms a single broker acts as the controller.
Source: Confluent Documentation, Apache Kafka Architecture > Controller.
2. Apache Kafka Documentation, "4. Design": Section 4.2, "Replication," details the controller's role. It specifies, "In Kafka, we have decided to elect one of the brokers as the 'controller'. This controller detects broker level failures and is responsible for changing the leader of all affected partitions in a failed broker." The use of the singular "one of the brokers" is explicit.
Source: Apache Kafka Official Documentation, kafka.apache.org, Design > Replication.
3. Kreps, J., Narkhede, N., & Rao, J. (2011). "Kafka: a Distributed Messaging System for Log Processing.": In Section 3.2, "Distribution," the foundational paper on Kafka states, "One of the brokers in the cluster functions as the controller, which is responsible for electing leaders." This academic source confirms the single-controller design from its inception.
Source: Proceedings of the NetDB, 2011, Section 3.2.
Keep practicing
Take the free CCDAK practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CCDAK practice questions
- Question 1In Avro, removing or adding a field that has a default is a __ schema evolution
- Question 2A topic has three replicas and you set min.insync.replicas to 2. If two out of three repl…
- Question 3To get acknowledgement of writes to only the leader partition, we need to use the config.…
- Question 4A customer has many consumer applications that process messages from a Kafka topic. Each …
- Question 5What information isn't stored inside of Zookeeper? (select two)
- Question 6If you enable an SSL endpoint in Kafka, what feature of Kafka will be lost?
