CCDAK practice question 9 of 25
If a topic has a replication factor of 3...
Full set: 150 questionsA replication factor of 3 for a Kafka topic means that for each partition, there will be a total of three identical copies, known as replicas. To achieve fault tolerance, Kafka distributes these replicas across different brokers in the cluster. One of these replicas is elected as the "leader," which handles all client read and write requests for that partition. The other two replicas are "followers," which passively copy the data from the leader. If the broker holding the leader replica fails, one of the follower replicas on another broker is promoted to become the new leader, ensuring data availability and durability.
A. Placing all replicas on a single broker would offer no fault tolerance, as a single broker failure would result in the loss of all copies of the data.
B. A replication factor of 3 corresponds to three total copies of each partition, which are placed on three distinct brokers, not four.
C. A replication factor of 3 corresponds to three total copies of each partition, which are placed on three distinct brokers, not two.
1. Confluent Documentation, Apache Kafka > Design > Replication: "The replication factor is set at the topic level. It determines how many copies of a topic’s partition logs are maintained and on how many brokers... Each partition has one leader and one or more followers (replicas). The total number of replicas, including the leader, constitutes the replication factor." This confirms that the factor defines the total number of copies distributed across brokers.
2. Apache Kafka Documentation, 3. Design > 3.2 Replication: "The unit of replication is the topic partition... The total number of replicas including the leader is the replication factor. All writes to the partition go to the leader and the leader writes the messages to its log... Followers consume messages from the leader and append them to their own logs." This explains the leader/follower model and that the factor equals the total number of copies.
3. Kleppmann, M. (2017). Designing Data-Intensive Applications. O'Reilly Media. Chapter 5, Replication, p. 156: "In Kafka, replication is implemented at the partition level. When a topic is created, you can configure how many replicas each partition should have... For example, if the replication factor is 3, then one broker is the leader for the partition, and two other brokers are followers." This academic source corroborates the distribution of leader and follower replicas across different brokers.
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?
