The Thundering Herd Problem

The Thundering Herd Problem

When everyone retries at once, and how jitter and backoff fix it

What you'll learn

  • What a thundering herd is
  • How it shows up in retries, caches and locks
  • Spreading retries out with jitter and backoff
  • Letting one request rebuild, and waking one waiter

In this video, we'll look at why a service can come back after an outage and fall over again right away. We'll use 10,000 clients that all retry after exactly five seconds to show how waiting clients rush in at the same moment and crush a recovering server.

We'll also look at the same problem in caches and in threads waiting on a lock, and the fixes: jitter, exponential backoff, letting only one request rebuild a cached value, and waking one waiter at a time.

By the end, you'll understand what causes a thundering herd and how to spread the load out.

More videos

32 short explainers so far, with more on the way

View all videos

Join the Community

roadmap.sh is among the top 10 most starred projects on GitHub and is visited by hundreds of thousands of developers every month.

Top 10 out of 28M!

371K

GitHub Stars

Star us on GitHub
Help us reach #1

+90kevery month

+3.2M

Registered Users

Register yourself
Commit to your growth

+2kevery month

52K

Discord Members

Join on Discord
Join the community

RoadmapsGuidesFAQsYouTube

roadmap.shby@nilbuild

Community created roadmaps, best practices, projects, articles, resources and journeys to help you choose your path and grow in your career.

© roadmap.sh·Terms·Privacy·

ThewNewStack

The top DevOps resource for Kubernetes, cloud-native computing, and large-scale development and deployment.