Thundering Herd Problem
Updated 2026-08-02
Summary
When a single resource or event releases, many sleeping processes wake at once and compete for it, spiking load and often reducing throughput or crashing the system.
Definition
In concurrent computing, the thundering herd problem describes what happens when a large number of processes blocked on the same event are all awakened by one notification, although only one can proceed. The wasted wakeups consume CPU and lock contention, and the losers must sleep again. The cure is selective wakeup: condition variables, edge-triggered notification, or randomized jitter that spreads the retries over time.
Introduction
How to use
- Warn about synchronized wakeups: treat any broadcast signal that rouses every waiter as a congestion risk - Spread the load: add random jitter so simultaneous demand fans out over time - Narrow the wakeup: notify one capable worker instead of the whole pool whenever possible
Mechanism
All waiters on one event are awakened by the same broadcast, but only a few can acquire the resource. The rest burn CPU, reacquire locks, and fall back asleep. Broadcast wakeup without selection turns a single event into a burst of contention, so throughput falls as the number of waiters rises.
Practice
In progress 0/1Practice this model in one real situation:
Cases
- A server listening on a socket wakes every worker thread on each incoming connection, so a burst of connections floods the scheduler.
- Cache entries expiring at the same second send thousands of clients to the origin database simultaneously.
Common pitfalls
- Assuming that waking more workers is always more responsive, when the wakeups themselves become the bottleneck.
- Ignoring the cost of putting awakened threads back to sleep, which can dominate the work actually performed.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Thundering_herd_problemverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS