External Publication
Visit Post

Request coalescing with Go singleflight

Redowan's Reflections [Unofficial] June 27, 2026
Source
A hot cache key expires and a hundred requests issue the same query at once, saturating the database. Go's singleflight package coalesces those duplicate calls into one. How to wire it up, how to measure whether it's firing, and why per-pod coalescing is usually enough.

Discussion in the ATmosphere

Loading comments...