The Quest for Speed: Journey to 50% Better P99 Times with Go
summary
Claim: P99 latency drops by ~50% (to ~45ms P99 then lower) across millions of holiday searches while cutting inter‑zonal egress by ~£100/day. Implementation: add Zstd compression middleware (initial CPU spike raises latency), then eliminate allocations by reusing zstd.Writer with a sync.Pool for zstd.Writer, replace generic JSON encoder with a bespoke byte‑buffer pool that runs ~3× faster, migrate workloads to ARM C4A, and set GOMAXPROCS low (≈2) to shave another ~10% — all measured with pprof, benchmarks and production replay.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:25System architecture
- 3:30Identifying the problem
- 5:07Zstd compression impact
- 6:15Observability and profiling
- 8:44Zstd optimization
- 14:46Sync pool implementation
- 19:14Batching request changes
- 24:03Hardware migration to ARM
- 28:47GOMAXPROCS adjustment
- 36:00Conclusion
- 39:08Q&A session








