DNS gateway hit 500 QPS wall due to missing Bloom filter and SQLite bottleneck
HydraDNS, an open-source DNS security gateway built in Go, was falsely documented as using a Bloom filter for blocklist lookups, when in reality every DNS query triggered a SQL COUNT against a 92,000-row SQLite table. The shared single database connection serialized both blocklist checks and query logging, capping throughput at around 500 queries per second regardless of available CPU headroom. The developer discovered the phantom Bloom filter never existed in code — a planning note had gradually become accepted fact across multiple documents. Replacing the SQL lookup with an in-memory atomic domain map boosted throughput nearly 19x, from ~500 to ~9,500 QPS. However, removing that first bottleneck exposed a second: per-query goroutines for logging overwhelmed the single database connection at high load, causing memory to spike toward 2GB and risking out-of-memory crashes on target hardware.
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