Bird
0
0

You want to optimize a Kafka producer for high throughput with minimal latency. Which combination of settings is best?

hard📝 Application Q8 of 15
Kafka - Performance Tuning
You want to optimize a Kafka producer for high throughput with minimal latency. Which combination of settings is best?
Abatch.size=65536, linger.ms=5, compression.type=snappy
Bbatch.size=16384, linger.ms=100, compression.type=none
Cbatch.size=32768, linger.ms=500, compression.type=gzip
Dbatch.size=8192, linger.ms=0, compression.type=snappy
Step-by-Step Solution
Solution:
  1. Step 1: Balance batch size and linger.ms for throughput and latency

    A larger batch size with a small linger.ms (5ms) allows good batching without much delay, balancing throughput and latency.
  2. Step 2: Choose efficient compression

    Snappy compression is fast and efficient, improving throughput without high CPU cost.
  3. Final Answer:

    batch.size=65536, linger.ms=5, compression.type=snappy -> Option A
  4. Quick Check:

    Large batch + low linger + fast compression = best throughput & latency [OK]
Quick Trick: Use large batch, low linger, fast compression for best throughput [OK]
Common Mistakes:
MISTAKES
  • Using high linger.ms increases latency
  • Choosing no compression reduces throughput
  • Small batch sizes limit throughput

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes