Bird
0
0

You want to optimize a Kafka consumer for high throughput but low latency. Which combination of settings is best?

hard📝 Application Q15 of 15
Kafka - Performance Tuning
You want to optimize a Kafka consumer for high throughput but low latency. Which combination of settings is best?
ASet both <code>max.poll.records</code> and <code>fetch.min.bytes</code> to high values
BSet <code>max.poll.records</code> low (e.g., 10) and <code>fetch.min.bytes</code> high (e.g., 1048576)
CSet <code>max.poll.records</code> high (e.g., 1000) and <code>fetch.min.bytes</code> low (e.g., 1)
DSet both <code>max.poll.records</code> and <code>fetch.min.bytes</code> to low values
Step-by-Step Solution
Solution:
  1. Step 1: Understand throughput and latency tradeoff

    High max.poll.records allows processing many records per poll, increasing throughput.
  2. Step 2: Understand fetch.min.bytes effect on latency

    Low fetch.min.bytes means the consumer fetches data quickly without waiting for large batches, reducing latency.
  3. Step 3: Combine settings for desired effect

    High batch size with low fetch size balances high throughput and low latency.
  4. Final Answer:

    Set max.poll.records high (e.g., 1000) and fetch.min.bytes low (e.g., 1) -> Option C
  5. Quick Check:

    High batch + low fetch.min.bytes = throughput + low latency [OK]
Quick Trick: High max.poll.records + low fetch.min.bytes = best balance [OK]
Common Mistakes:
MISTAKES
  • Setting both values high causes latency spikes
  • Setting both low reduces throughput
  • Ignoring fetch.min.bytes impact on latency

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes