CCDAK practice question 23 of 25
A topic has three replicas and you set min.insync.replicas to 2. If two out of three replicas are not available, what happens when a produce request with acks=all is sent to broker?
Full set: 150 questionsWhen a producer sends a request with acks=all, the leader broker must ensure the write is replicated to all replicas in the In-Sync Replica (ISR) set. Concurrently, the broker enforces the min.insync.replicas setting before accepting the write. In this scenario, two of the three replicas are unavailable, leaving only one replica in the ISR set. Since the ISR size (1) is less than the required min.insync.replicas (2), the broker cannot satisfy the configured durability guarantee. It will immediately reject the produce request and return a NotEnoughReplicasException to the client. This mechanism prioritizes data consistency and durability over availability.
B. This would violate the durability guarantee explicitly configured by min.insync.replicas=2. The system is configured to fail the write rather than accept it with insufficient redundancy.
C. The broker does not block. It immediately rejects the request because the precondition (ISR size >= min.insync.replicas) is not met. The producer may experience a timeout, but the broker's response is an exception.
1. Apache Kafka Documentation, Section 5.4 Guarantees: "Note that the topic must be configured with a min.insync.replicas setting to make this durability guarantee meaningful... If a topic is configured with min.insync.replicas=2 then the producer will get an exception if it tries to send data with acks=all and there is only one replica alive."
2. Confluent Documentation, Broker Configuration min.insync.replicas: "When a producer sets acks to all (or -1), min.insync.replicas specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (NotEnoughReplicas or NotEnoughReplicasAfterAppend)."
3. Narkhede, N., Shapira, G., & Palino, T. (2017). Kafka: The Definitive Guide. O'Reilly Media. Chapter 4, "Reliable Data Delivery", section "Configuring for Reliability": "If the number of ISRs is lower than min.insync.replicas, the broker will stop accepting produce requests with acks=all and will return a NotEnoughReplicasException to the client."
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?
