Bird
0
0

To reduce consumer lag under heavy load, which combination of tuning is best?

hard📝 Application Q9 of 15
Kafka - Performance Tuning
To reduce consumer lag under heavy load, which combination of tuning is best?
ADecrease <code>max.poll.records</code> and increase <code>fetch.max.wait.ms</code>
BDisable auto-commit and increase <code>fetch.min.bytes</code>
CSet <code>max.poll.records</code> to zero and <code>fetch.max.wait.ms</code> to high
DIncrease <code>max.poll.records</code> and decrease <code>fetch.max.wait.ms</code>
Step-by-Step Solution
Solution:
  1. Step 1: Understand max.poll.records effect

    Increasing max.poll.records lets consumer fetch more records per poll, reducing lag.
  2. Step 2: Understand fetch.max.wait.ms effect

    Decreasing fetch.max.wait.ms reduces wait time for data, speeding fetches.
  3. Final Answer:

    Increase max.poll.records and decrease fetch.max.wait.ms -> Option D
  4. Quick Check:

    Reduce lag by fetching more and waiting less = B [OK]
Quick Trick: Fetch more records faster to reduce lag [OK]
Common Mistakes:
  • Reducing max.poll.records increases lag
  • Increasing fetch.max.wait.ms delays fetch
  • Setting max.poll.records to zero stalls consumer

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes