# The most important thing to understand about queues – Dan Slimmon

<https://blog.danslimmon.com/2016/08/26/the-most-important-thing-to-understand-about-queues/>

- Host: [blog.danslimmon.com](https://links.thingelstad.xyz/hosts/blog.danslimmon.com/)
- Saved: March 10, 2022 (2022-03-11T03:12:19Z)
- Record: https://links.thingelstad.xyz/links/43523a674956/
- JSON: https://links.thingelstad.xyz/links/43523a674956.json

## What Jamie wrote

Every major system I've worked with for the last two decades plus has used queues in some way, and anyone that has worked around queues in production long enough has learned the hard way that queues behave very differently as they get larger. Typically queue performance decreases exponentially as the queue gets more messages on it.

> To reiterate:
> 
> **As you approach maximum throughput, average queue size – and therefore average wait time – approaches infinity.**
> 
> What’s the solution, then? We only have so many variables to work with in a queueing system. Any solution for the exploding-queue-size problem is going to involve some combination of these three approaches:
> 
> 1. Increase capacity
> 2. Decrease demand
> 3. Set an upper bound for the queue size
>
> I like number 3. It forces you to acknowledge the fact that queue size is always finite, and to think through the failure modes that a full queue will engender.

I agree with the author here, not limiting a queue at some point is the equivalent of ignoring error messages. Extra credit can be achieved here by introducing some chaos engineering. How about having your queue server reject 0.1% requests all the time, and then enforce the maximum. 

The complicated aspect here is that the queue server cannot determine the maximum, because it dramatically will change with the size and type of messages on the queue.

## Facts

- Kind: [Page](https://links.thingelstad.xyz/kinds/page/)

## Appears in

- [WT215: Weekly Thing #215 / Queues, Tor, Venting](https://weekly.thingelstad.com/archive/215/), Featured

## Same host

- [Do-nothing scripting: the key to gradual automation – Dan Slimmon](https://links.thingelstad.xyz/links/00a288de97e8/) (blog.danslimmon.com, November 4, 2021)
- [Dead air on the incident call – Dan Slimmon](https://links.thingelstad.xyz/links/0b4019a3c305/) (blog.danslimmon.com, March 21, 2024)

## Saved the same week

- [Twitter is launching a Tor-friendly version of its site - The Verge](https://links.thingelstad.xyz/links/72c12b8859e3/) (theverge.com, March 8, 2022)
- [Venting doesn’t work](https://links.thingelstad.xyz/links/2256ed976265/) (slate.com, March 10, 2022)
- [Apple’s big Baseball deal, detailed – Six Colors](https://links.thingelstad.xyz/links/3cc2f2d6c8bc/) (sixcolors.com, March 10, 2022)
- [Defining Our Work | GTD®](https://links.thingelstad.xyz/links/5486e3e49be3/) (youtube.com, March 10, 2022)
- [Giant Joro spiders expected to drop from sky across the East Coast this spring - Axios Washington D.C.](https://links.thingelstad.xyz/links/ae472cfb3a81/) (axios.com, March 10, 2022)

## Elsewhere

- Wayback Machine: https://web.archive.org/web/*/https://blog.danslimmon.com/2016/08/26/the-most-important-thing-to-understand-about-queues/
