Request coalescing.
also: single flight · single-flight · singleflight · request collapsing · coalescingConcurrent requests for the same missing key share one fetch from the source; the rest wait and reuse its result.
the two-minute refresher
- Request A starts the DB query; B and C arriving meanwhile wait for A's result.
- 100 concurrent misses become 1 database query.
- Unlike a lock, nobody polls or waits to retry: requests join the in-flight fetch and all get the result together.
- Typically in-process, per server: N servers can still send up to N queries.