CCAAK practice question 2 of 15
A developer is working for a company with internal best practices that dictate that there is no single point of failure for all data stored. What is the best approach to make sure the developer is complying with this best practice when creating Kafka topics?
Full set: 54 questionsThe core principle to avoid a single point of failure for data in Kafka is replication. The topic's replication-factor determines how many copies of each partition's data are stored across different brokers in the cluster. Setting the replication factor to 3 (a common best practice) ensures that for each partition, there is one leader and two follower replicas on three separate brokers. If one broker fails, the data remains available on the other two, and a new leader can be elected from the in-sync followers, thus preventing data loss and service interruption.
A. Setting min.insync.replicas to 1 weakens durability. It allows a producer's write to be considered successful after only the leader broker has received it, risking data loss if that broker fails before replication occurs.
B. Partitions are for parallelism and scaling, not fault tolerance. A topic with many partitions but a replication factor of 1 still has a single point of failure for the data in each partition.
C. linger.ms is a producer-side configuration that controls batching to optimize throughput. It has no impact on how data is stored on the brokers for fault tolerance.
1. Confluent Documentation, "Kafka Topics": "Replication is at the core of Kafka's fault tolerance. The replication factor specifies how many copies of the data are made... For a replication factor of N, Kafka can tolerate up to N-1 server failures without losing any committed messages. A typical replication factor is 3."
Source: Confluent Documentation, "Manage Topics" section.
2. Apache Kafka Documentation, "3.4 Replication": "Replication is at the heart of Kafka's fault-tolerance... We recommend using a replication factor of 3, which allows for tolerating 2 broker failures."
Source: Apache Kafka 3.7 Documentation, Section 3.4 "Replication".
3. Confluent Documentation, "Producer Configs": The documentation for min.insync.replicas states, "When set to 1, the producer will get an acknowledgement as soon as the leader has written the message to its local log." This highlights the risk associated with this setting, which contradicts the goal of high availability.
Source: Confluent Documentation, "Producer Configuration Settings".
Keep practicing
Take the free CCAAK practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CCAAK practice questions
- Question 1When a broker goes down, what will the Controller do?
- Question 3A company is setting up a log ingestion use case where they will consume logs from numero…
- Question 4If the Controller detects the failure of a broker that was the leader for some partitions…
- Question 5Where are Apache Kafka Access Control Lists stored'?
- Question 6Which tool is used for scalably and reliably streaming data between Kafka and other data …
- Question 7You are using Confluent Schema Registry to provide a RESTful interface for storing and re…
