Go DNS gateway jumps from 500 to 9,500 QPS after phantom Bloom filter exposed
HydraDNS, an open-source DNS security gateway written in Go, was stress-tested by its developer on a 22-core machine to find its real-world throughput limits before wider deployment. The benchmark revealed two stacked bottlenecks: every query — including cache hits — triggered a SQL COUNT against a 92,000-row SQLite table routed through a single database connection, producing p99 latencies of five seconds. Investigating the hot path also uncovered a documentation error: three internal documents claimed the blocklist used a Bloom filter, but no such implementation ever existed in the codebase. The fix was an atomic in-memory domain set, loaded at startup and refreshed every six hours, which replicated the existing lookup behaviour without any database calls. Replacing the SQL check with this in-memory layer lifted throughput nineteen-fold, from roughly 500 to 9,500 queries per second.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in