Another weekend, another weekend read, this time all about Queues Don't Fix Overload
I am writing a book on Thinking in Distributed Systems. 12 chapters, one chapter per month, full of diagrams, illustrations, and examples, all about distributed systems.
In his blog post Queues Don't Fix Overload, Fred Hebert discusses the use and abuse of queues to handle load in distributed systems.
According to the post, most of the projects the author ends up working on “can be visualized as a very large bathroom sink. Water goes in, water goes out, everyone's happy. However, from time to time, you'll see temporary overload on your system”.
“The problem comes when you inevitably encounter prolonged overload. All of a sudden, the buffers, queues, whatever, can't deal with it anymore. You're in a critical state where you can see smoke rising from your servers, or if in the cloud, things are as bad as usual, but more! The system inevitably crashes”.
The author explores, both with humor and also with first-hand-experience frustration, many false solutions that will not work and the one true solution that will work: Pick what has to give!
“But someone should have picked what had to give: do you stop people from inputting stuff in the system, or do you shed load. Those are inescapable choices, where inaction leads to system failure”.
A fun and easy read yet with profound insights that focus our attention on load-shedding and backpressure when thinking about queues to stem load.
Happy Reading
Queues Don't Fix Overload
Fred Hebert
People misuse queues all the time. The most egregious case being to fix issues with slow apps, and consequently, with overload. But to say why, I'll need to take bits of talks and texts I have around the place, and content that I have written in more details about in Erlang in Anger.