A dashboard shows 10,000 messages in a queue. Should you worry?
Sketch your own answer first, then compare it with the one below.
A strong answer
Not from that number alone. Depth only becomes meaningful next to the drain rate. If the consumers finish 5,000 a second, 10,000 messages is two seconds of work. If they finish 10 a second, it is more than 16 minutes.
Little's law gives the second view. Divide depth by the arrival rate and you get the average wait in the queue. At 500 arrivals a second, 10,000 waiting means about 20 seconds.
Then check the direction. A depth of 10,000 that was 12,000 an hour ago is draining. The same depth that was 2,000 an hour ago is growing, and growth means arrivals exceed capacity. So I would look at three things together: depth, its trend, and the age of the oldest message, which is what a user actually experiences. Whether 10,000 is fine depends on how long a message can wait before it stops being useful.
Sources
- John D. C. Little (1961). A Proof for the Queuing Formula: L = λ W.
- Amazon Web Services documentation (2024). Available CloudWatch metrics for Amazon SQS.