AdvancedScenario
15 min
Kafka Consumer Lag
KafkaMessagingPerformance
Advertisement
Interview Question
Your Kafka consumer groups are showing high lag and messages are processing slowly. How do you investigate and remediate this?
Key Points to Cover
- Check consumer offsets and group rebalances
- Validate consumer parallelism and partition assignment
- Inspect slow processing logic and batch sizes
- Scale consumers horizontally or tune fetch configs
- Add monitoring/alerting on lag growth rate
Evaluation Rubric
Analyzes offsets/lag correctly30% weight
Checks partition assignment and parallelism30% weight
Identifies slow processing causes20% weight
Proposes scaling/tuning fixes20% weight
Hints
- 💡Look at rebalances, GC pauses, and slow consumers.
Potential Follow-up Questions
- ❓What about exactly-once semantics?
- ❓How do you size partitions properly?
Advertisement