Chapter 5. Thundering Herds
You glimpse it first on the horizon. Is that smoke? No, it’s something worse—the dust kicked up by a thundering herd, and it’s heading your way. Any moment now, the herd will arrive, sweeping all before it, and leaving everything in its wake broken and destroyed.
Now obviously, as a metaphor for system problems, this might be a bit over the top, but I think you get the idea. When it comes to keeping systems up and running, few things worry us more than the prospect of some thundering herd arriving unexpectedly and taking the system down. Be it a sudden interest in a new product, a denial of service (DoS) attack launched by some nefarious ne’er-do-well, or even a sudden spike in load that your own system accidentally inflicted upon itself, the thundering herd is a potentially catastrophic event that may seem outside of your control.
In this chapter, I’ll take you through several examples of the thundering herd. Some I’ve taken directly from real stories, while others are slightly more contrived examples of challenges that are commonly faced with distributed systems. As I take you through these examples, I’ll also share with you some concrete tips on how the damage from these herds can be mitigated, and perhaps even how the herds themselves can be avoided altogether. Before we get there, though, I want to go into a little bit more detail about what thundering herds are and why they are so problematic.
What Is a Thundering Herd?
In computing, when a lot ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access