feat: wire-level forwarding, cache, request hedging, and DoH keepalive
Wire-level forwarding path skips DnsPacket parse/serialize on the hot path. Cache stores raw wire bytes with pre-scanned TTL offsets — patches ID + TTLs in-place on lookup instead of cloning parsed packets. Request hedging (Dean & Barroso "Tail at Scale") fires a second parallel request after a configurable delay (default 10ms) when the primary upstream stalls. DoH keepalive loop prevents idle HTTP/2 + TLS connection teardown. Recursive resolver now hedges across multiple NS addresses and caches NS delegation records to skip TLD re-queries. Integration test harness polls /blocking/stats instead of fixed sleep, eliminating the blocklist-download race condition.
This commit is contained in:
@@ -53,7 +53,17 @@ CONF
|
||||
echo "Starting Numa on :$PORT ($SUITE_NAME)..."
|
||||
RUST_LOG=info "$BINARY" "$CONFIG" > "$LOG" 2>&1 &
|
||||
NUMA_PID=$!
|
||||
sleep 4
|
||||
sleep 2
|
||||
|
||||
# Wait for blocklist to load (if blocking is enabled in this suite)
|
||||
if echo "$SUITE_CONFIG" | grep -q 'enabled = true'; then
|
||||
for i in $(seq 1 20); do
|
||||
LOADED=$(curl -sf http://127.0.0.1:$API_PORT/blocking/stats 2>/dev/null \
|
||||
| grep -o '"domains_loaded":[0-9]*' | cut -d: -f2)
|
||||
if [ "${LOADED:-0}" -gt 0 ]; then break; fi
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
if ! kill -0 "$NUMA_PID" 2>/dev/null; then
|
||||
echo "Failed to start Numa:"
|
||||
|
||||
Reference in New Issue
Block a user