Tag

singleflight

0 views collected around this technical thread.

Go Programming World
Go Programming World
Nov 25, 2024 · Backend Development

Understanding Go's singleflight: Request Merging, Implementation and Use Cases

singleflight, a Go concurrency primitive from the x/sync package, merges duplicate in‑flight requests to reduce server load, with detailed usage examples, source code analysis, and discussion of its differences from sync.Once and typical application scenarios such as cache‑penetration, remote calls, and task deduplication.

ConcurrencyGocache
0 likes · 26 min read
Understanding Go's singleflight: Request Merging, Implementation and Use Cases
Inke Technology
Inke Technology
Oct 20, 2022 · Backend Development

How We Cut 60% of Backend Load with Go’s singleflight and Smart Caching

This article examines how the mic‑queue list in a live‑streaming app caused heavy server load due to three‑second polling, and details a systematic performance‑optimization process—including analysis, reducing I/O, employing Go’s singleflight caching, and switching JSON libraries—to cut resource usage by up to 60% while preserving user experience.

BackendPerformance Optimizationcaching
0 likes · 7 min read
How We Cut 60% of Backend Load with Go’s singleflight and Smart Caching