Bird
0
0

You want to optimize Kafka producer throughput by tuning batch size and compression. Which combination is best for high throughput with moderate latency?

hard📝 Application Q8 of 15
Kafka - Performance Tuning
You want to optimize Kafka producer throughput by tuning batch size and compression. Which combination is best for high throughput with moderate latency?
AIncrease batch.size to 64 KB and use compression.type 'lz4'.
BSet batch.size to 1 KB and compression.type 'none'.
CSet batch.size to 0 and compression.type 'gzip'.
DUse batch.size 16 KB and compression.type 'none'.
Step-by-Step Solution
Solution:
  1. Step 1: Understand batch.size impact

    Larger batch.size (64 KB) allows more data per request, improving throughput but may increase latency slightly.
  2. Step 2: Choose compression type

    lz4 offers fast compression and decompression, good for throughput with moderate latency.
  3. Final Answer:

    Increase batch.size to 64 KB and use compression.type 'lz4'. -> Option A
  4. Quick Check:

    Large batch + fast compression = high throughput [OK]
Quick Trick: Big batch + fast compression = better throughput [OK]
Common Mistakes:
  • Using very small batch sizes
  • Choosing no compression for throughput
  • Using slow compression codecs for throughput

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes