A "low priority" perf tweak in go53 — our self-hosted, open-source DNSSEC authoritative DNS server — turned into an afternoon of test-case hell.
Swapped an RWMutex config read for an atomic.Pointer (lock-free immutable snapshots): ~1.9× faster serial, ~19× on 20 cores. Five-minute change → 180 lines across 20 test files, plus a hidden DNSSEC-signing data race it surfaced.
Every shortcut has a price.
https://tenforward.se/blog/a-small-performance-fix-that-turned-into-test-case-hell/
#DNS #DNSSEC #Golang #SelfHosted #OpenSource #SysAdmin #go53

A Small Performance Fix That Turned Into Test-Case Hell | Tenforward
go53 issue #45 was labelled 'Low' priority: stop taking a mutex every time we read the live config on the DNS hot path. The fix was a textbook lock-free swap. The cleanup it triggered across the test suite was the larger half of the work.





