Checkly Rewrites a 92-Million-Message Node.js Service in Go With Claude Code
Summary
Checkly rewrote its Results Daemon, a production worker processing about 92 million messages per day, from vanilla JavaScript on Node.js to Go with Claude Code. The service consumes check results, writes to databases, determines outcomes, sends alerts, schedules retries, and publishes WebSocket updates. The team built a language-independent black-box test harness before asking the agent to write code. It generated deterministic inputs from 24 hours of account, group, check, and result data, stored legacy outputs as golden files, normalized test-generated UUIDs and timestamps, and used real PostgreSQL containers plus controlled queue, cache, and service boundaries. Playwright, Docker Compose, and Toxiproxy supported parallel testing and infrastructure-failure scenarios, while code coverage was used to find gaps and target 90% to 100% coverage. Claude Code ran overnight and produced a deployable Go service of about 13,000 application lines within the daily limits of a $200 subscription; an earlier Opus attempt was discarded. Human review removed inherited or introduced configuration anti-patterns and added deeper observability. The first production rollout exposed a harness flaw: local tests modeled three retry queues, while production used 18 possible queues per region based on additional routing factors. After aligning the harness with production and refactoring retries, the team migrated internal traffic and then customers in staged cohorts, monitoring each for 24 to 48 hours. CI ran the harness against both implementations during the transition, and bugs were reproduced in the harness before fixes. The migration finished after a week, with no customer-noticed disruption and zero incidents reported for the rewrite. The Go service used fewer pods, freeing about 15 vCPUs and 45 GB of memory, while database average active sessions fell 60% and database CPU declined about 15%. Checkly attributes the result to strict behavioral validation, production-faithful boundaries, and human intervention where the agent needed correction, rather than to autonomous code generation alone.