Member-only story
Featured
Bye Bye Go, Hello Rust
How a hardcoded 120-second timer buried in the Go runtime broke production dashboards, and why Discord, Cloudflare, and Vercel quietly rewrote their core services.
Look at the Grafana dashboard of a high-throughput Go service holding gigabytes of state in memory, and you will eventually see the sawtooth.
Everything runs flat for 119 seconds. CPU usage hums along at 20%. Response times sit below two milliseconds. Then, right on the 120-second mark, a violent spike hits the graph. Latency jumps tenfold. CPU cores peg at 100%. Two seconds later, the spike vanishes, and the system goes back to sleep for another two minutes.
No cron job fired. No database backup started. Nobody deployed new code.
When engineers at Discord first ran into this exact phantom spike on their Read States service, they tore their infrastructure apart looking for an external culprit. They didn't find it in their AWS network or their database cluster. They found it buried inside the Go language source code itself, specifically inside src/runtime/proc.go:
// forcegcperiod is the maximum time in nanoseconds between GC cycles.
var forcegcperiod int64 = 2 * 60 * 1e9Two minutes. Hardcoded right into the runtime.









