Request coalescing with Go singleflight

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.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论