Apex › Operations & SRE

Request coalescing (singleflight)

Stopping a cache miss from becoming a stampede. When a hot key expires, every concurrent request misses at once and they all hit the backend for the same value. Singleflight lets the first compute it while the rest wait and share the result — N simultaneous misses become one backend call.

More in Operations & SRE