Request Coalescing
also: single-flight · request collapsing
Collapse many identical in-flight requests into one — so a cache miss on a hot key hits the origin once, not thousands of times.
Request coalescing (single-flight) merges concurrent identical requests into a single underlying call: the first request does the work, and the others wait for and share its result. It is a key defense against the thundering-herd / cache-stampede problem.
Worked example: a popular cache key expires and 5,000 requests arrive at once; with coalescing, one request recomputes the value from the database and the other 4,999 wait on it, so the origin sees a single query instead of 5,000. Gotcha: it only helps for reads that are genuinely identical and idempotent, and the shared computation becomes a single point of failure for those waiters (if it errors, they all get the error) — so pair it with a short timeout and, ideally, serve a slightly-stale cached value while one request refreshes.