IntermediateScenario
10 min
Message Queue Backlog
MessagingQueuesPerformance
Advertisement
Interview Question
Your RabbitMQ/SQS queue has millions of unprocessed messages. What steps do you take?
Key Points to Cover
- Check consumer health, parallelism, and errors
- Investigate slow processing logic
- Scale consumers or add workers
- Consider DLQs for poison messages
- Backpressure or rate limit producers
Evaluation Rubric
Checks consumer health and throughput30% weight
Finds slow processing logic30% weight
Suggests scaling workers20% weight
Mentions DLQs/backpressure20% weight
Hints
- 💡Look for retry storms or poison messages.
Common Pitfalls to Avoid
- ⚠️Focusing solely on increasing consumer count without diagnosing the underlying processing logic.
- ⚠️Ignoring infrastructure-level issues like network latency or resource contention on consumer nodes.
- ⚠️Implementing retries without appropriate backoff strategies, which can exacerbate the problem.
- ⚠️Not investigating external dependencies and their impact on processing speed.
- ⚠️Failing to set up adequate monitoring and alerting to detect such issues proactively.
Potential Follow-up Questions
- ❓How to monitor lag effectively?
- ❓How do you prevent queue overload?
Advertisement