Bird
0
0

You want to optimize Kafka producer throughput for large messages. Which combination of settings is best?

hard📝 Application Q8 of 15
Kafka - Performance Tuning
You want to optimize Kafka producer throughput for large messages. Which combination of settings is best?
ADecrease buffer.memory, set batch.size to 1, linger.ms to 0
BDisable buffering by setting buffer.memory to 0
CSet buffer.memory to default, batch.size very small, linger.ms very large
DIncrease buffer.memory and batch.size, set linger.ms to a small positive value
Step-by-Step Solution
Solution:
  1. Step 1: Consider large message handling

    Large messages benefit from larger buffer.memory and batch.size to reduce overhead.
  2. Step 2: Use linger.ms to allow batching

    A small positive linger.ms allows more messages to batch before sending, improving throughput.
  3. Final Answer:

    Increase buffer.memory and batch.size, set linger.ms to a small positive value -> Option D
  4. Quick Check:

    Large buffers and batching improve throughput [OK]
Quick Trick: Larger buffers and batch with small linger.ms boost throughput [OK]
Common Mistakes:
  • Setting batch.size too small for large messages
  • Disabling buffering
  • Using zero linger.ms causing immediate sends

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes