Bird
0
0

You want to optimize Kafka producer for low latency and high throughput. Which combination of memory and buffer settings is best?

hard📝 Application Q15 of 15
Kafka - Performance Tuning
You want to optimize Kafka producer for low latency and high throughput. Which combination of memory and buffer settings is best?
AIncrease <code>buffer.memory</code>, decrease <code>linger.ms</code>, increase <code>batch.size</code>
BDecrease <code>buffer.memory</code>, increase <code>linger.ms</code>, decrease <code>batch.size</code>
CKeep <code>buffer.memory</code> small, set <code>linger.ms</code> high, increase <code>batch.size</code>
DSet <code>buffer.memory</code> and <code>batch.size</code> low, <code>linger.ms</code> high
Step-by-Step Solution
Solution:
  1. Step 1: Understand latency vs throughput tradeoff

    Low latency means sending data quickly, high throughput means sending large batches efficiently.
  2. Step 2: Adjust buffer and batch settings accordingly

    Increasing buffer.memory and batch.size allows bigger batches, while decreasing linger.ms reduces wait time before sending.
  3. Final Answer:

    Increase buffer.memory, decrease linger.ms, increase batch.size -> Option A
  4. Quick Check:

    Big buffer + big batch + low linger = low latency & high throughput [OK]
Quick Trick: Big buffer and batch, low linger for speed and volume [OK]
Common Mistakes:
MISTAKES
  • Increasing linger.ms reduces latency
  • Decreasing buffer.memory improves throughput
  • Setting batch.size too low for throughput

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes