CCAAK practice question 3 of 15

A company is setting up a log ingestion use case where they will consume logs from numerous systems. The company wants to tune Kafka for the utmost throughput. In this scenario, what acknowledgment setting makes the most sense?

Full set: 54 questions
Answer options
A: acks=0 Correct answer
B: acks=1
C: acks=all
D: acks=undefined
Correct Answer:
A. acks=0
Explanation

The acks (acknowledgments) configuration determines the durability guarantee for messages sent by a producer. To achieve the "utmost throughput," latency must be minimized. Setting acks=0 instructs the producer not to wait for any acknowledgment from the broker after sending a message. This "fire and forget" approach eliminates the round-trip time of waiting for a response, allowing the producer to send messages as fast as the network buffer allows. This configuration is suitable for use cases like high-volume log ingestion where losing a small fraction of messages is an acceptable trade-off for maximizing ingestion speed.

Why Incorrect

B. acks=1: This setting requires acknowledgment from the partition leader, which introduces latency and thus reduces throughput compared to acks=0.
C. acks=all: This provides the strongest durability by waiting for all in-sync replicas to acknowledge the write, but it incurs the highest latency and lowest throughput.
D. acks=undefined: This is not a valid configuration value for the acks parameter in Kafka.

References

1. Confluent Documentation, Producer Configs: The official documentation for the acks parameter states: "If set to zero then the producer will not wait for any acknowledgment from the server at all. The record will be immediately added to the socket buffer and considered sent." This describes the mechanism that yields the highest throughput.

Source: Confluent Documentation, "Producer Configs", section acks.

2. Narkhede, N., Shapira, G., & Palino, T. (2021). Kafka: The Definitive Guide (2nd ed.). O'Reilly Media. In Chapter 4, "Kafka Producers: Writing Messages to Kafka," the section "Configuring Producers" explains the acks setting. It explicitly notes, "If you choose acks=0, the producer will not wait for a reply from the broker... This is the fastest way to send messages, but you will lose messages if the server fails."

Source: Chapter 4, Section: "Configuring Producers", Subsection: "acks".

3. Confluent Developer Courseware, Apache Kafka 101: The course material on Producers explains the trade-offs: "acks=0... This is the fastest option but offers the weakest durability guarantees... This setting is often used for data that can be lost, such as metrics collection." This directly aligns with the high-throughput log ingestion scenario.

Source: Confluent Developer, "Apache Kafka 101", Module: "Producers", Lesson: "Producer Guarantees and Configuration".

Scroll to Top