Writing2 posts
How things broke, and how I fixed them.
- 9 min read
I removed Gin and GORM from my Go API. Only one of them made it faster.
Replacing Gin with net/http and GORM with sqlc in LabFlow, one change at a time, measured with the same k6 load: a 24% smaller binary from dropping Gin, faster requests from dropping GORM, and a bug a struct tag had been hiding.
GoPostgreSQLsqlcPerformanceArchitecture - 8 min read
My Go API failed 79% of requests under load. Here's what fixed it.
Load testing LabFlow, a Go lab-management API, with k6 and Grafana: an unbounded connection pool, a 5-query permission check and errors disguised as 403s, and the fixes that took p95 from 8.4 s to 13 ms.
GoPerformancePostgreSQLk6Observability