Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M4494

Thundering Herd Problem

Thundering Herd Problem
BusinessHigh supportManagement
Included
account_tree

Updated 2026-08-02

Loading revision record…

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.

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/1

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

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.

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Thundering_herd_problemZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS