SShortSingh.
Back to feed

DNS gateway hit 500 QPS wall due to missing Bloom filter and SQLite bottleneck

0
·8 views

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.

Read the full story at DEV Community

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

Related stories

0
ProgrammingDEV Community ·

Dev builds Rust system monitor, uses unsafe FFI to fetch disk usage via statvfs

Developer Maneshwar is documenting a day-by-day build of a btop-style system monitor in Rust using the ratatui library. On day three, tackling disk usage metrics, he hit a wall: unlike CPU and memory stats, filesystem fullness is not exposed through any file in /proc or /sys. The only way to retrieve it is via the statvfs(2) syscall, which required using Rust's FFI and writing his first unsafe block. Rather than shell out to the df command and parse its output, he called the syscall directly through the libc crate, keeping the unsafe code isolated within a single function that returns a safe Option type. He also highlighted key considerations such as converting Rust strings to NUL-terminated CStrings and the importance of documenting safety assumptions inside every unsafe block.

0
ProgrammingDEV Community ·

Fluentic Style launches with two Tailwind presets for JSX-based React styling

Fluentic Style is a new JSX styling library supporting React, Preact, Solid, and compatible JSX runtimes, built around typed style objects and a css prop. The library was originally designed with an object-first API, using explicit composition, selector chains, component slots, scopes, and themes. As the developer considered Tailwind integration, two separate presets were added: one that maps Tailwind's vocabulary into Fluentic's object-based dialect, and another that accepts standard Tailwind class name strings as input. Both presets retain Fluentic's chain methods for handling states, media queries, and selectors, rather than embedding variant logic inside class strings. The project aims to ease adoption for Tailwind-oriented codebases while preserving Fluentic's structured styling model.

0
ProgrammingDEV Community ·

Developer Spends a Year Removing Servers Instead of Adding AI to Projects

Software developer Vijay Kanna published a reflective post on DEV Community on July 31 describing his unconventional approach over the past year. Rather than following the industry trend of integrating AI into applications, he focused on eliminating server dependencies from his projects. Kanna chose deterministic, predictable solutions over AI-driven ones, going against the grain of current mainstream development practices. He shared his experience to spark discussion among fellow developers about whether skipping AI integration was the right call. The post invites others to reflect on whether they have made similar choices or come to regret not adopting AI in their own work.

0
ProgrammingDEV Community ·

Metaharness Framework Uses Multi-Agent Adversarial Reviews to Catch AI Reviewer Errors

A proposed 'metaharness' system addresses a key flaw in AI-assisted code review: a single AI reviewer can generate confident but incorrect findings that block pull requests or erode team trust. The framework routes code changes to human reviewers when confidence falls below 0.7, costs exceed a set budget, or benchmark results are statistically ambiguous. Specialist and adversarial agents split review roles, with cross-examination used to challenge and filter unreliable findings. The routing logic is encoded explicitly in policy code rather than left to reviewer intuition, ensuring deterministic, auditable behavior. By default, only mechanical and graph-based validations are allowed to gate a pull request automatically, keeping human oversight central to uncertain cases.