---
title: "Improving DNS performance with NodeLocalDNS"
description: "Neon deployed node-local-dns as a DaemonSet across its EKS clusters running hundreds of thousands of ephemeral Postgres pods, moving the 95%+ cache-hit DNS traffic off the network and onto each node."
url: "https://swe.quest/articles/improving-dns-performance-with-nodelocaldns-01d6f54219a60f0f"
canonical: "https://neon.com/blog/improving-dns-performance-with-nodelocaldns"
source: "Neon"
published: "2025-12-01"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["dns","kubernetes","performance","caching","networking"]
---

# Improving DNS performance with NodeLocalDNS

A post on [Neon](https://swe.quest/sources/neon.md), published 2025-12-01, 6 min read, Case study. Original: [https://neon.com/blog/improving-dns-performance-with-nodelocaldns](https://neon.com/blog/improving-dns-performance-with-nodelocaldns)

## Summary

Neon deployed node-local-dns as a DaemonSet across its EKS clusters running hundreds of thousands of ephemeral Postgres pods, moving the 95%+ cache-hit DNS traffic off the network and onto each node. CoreDNS p99 latency fell from ~1.5ms to 240µs and p99.9 from 10–20ms to under 2ms, while CoreDNS load dropped 97% (~2k to ~60 req/s) and now scales with node count rather than Postgres instances. The lower load exposed NXDOMAIN amplification from a bad /etc/hosts entry, which they blackholed with the CoreDNS template plugin. A race between kube-proxy installing iptables rules for kube-dns-upstream and the DaemonSet forwarding to it caused TCP timeouts, avoided by deploying the Service before the DaemonSet (or the reverse order with Cilium Local Redirect Policy).

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [DNS](https://swe.quest/tags/dns.md) (Infrastructure)
- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)

## Prerequisites

- Kubernetes Services and DaemonSets ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- DNS resolution basics ([easy posts on DNS](https://swe.quest/tags/dns.md?difficulty=easy))
- kube-proxy and iptables

## Keywords

NodeLocalDNS, CoreDNS, kube-proxy, AWS EKS, Cilium, iptables, Neon

## Related posts

- [It’s always DNS . . . except when it’s not: A deep dive through gRPC, Kubernetes, and AWS networking](https://swe.quest/articles/it-s-always-dns-except-when-it-s-not-a-deep-dive-through-grpc-kubernetes-and-44627d906e7c0646.md): Datadog Engineering · 2022-04-13 · Hard · 18 min read · Networking, Kubernetes, DNS, Linux, Incidents & postmortems
  Errors during rollouts of Datadog's metrics query service looked like DNS failures, but the root cause was VPC connection tracking saturation on AWS ENIs.
- [Breaking down OpenAI's outage: How to avoid a hidden DNS dependency in Kubernetes](https://swe.quest/articles/breaking-down-openai-s-outage-how-to-avoid-a-hidden-dns-dependency-in-kubernetes-4aeac94c226460a9.md): Render · 2024-12-17 · Medium · 6 min read · Kubernetes, DNS, Incidents & postmortems, Resilience, SRE
  CoreDNS doesn't need the Kubernetes API server to answer queries, but it does need it to initialize.
- [Not just another network latency issue: How we unraveled a series of hidden bottlenecks](https://swe.quest/articles/not-just-another-network-latency-issue-how-we-unraveled-a-series-of-hidden-cc3a7d83431d9610.md): Datadog Engineering · 2023-05-26 · Medium · 8 min read · Networking, Debugging, Performance engineering, Cloud platforms, Kubernetes
  Recurring high-startup-latency pages on every deployment of Datadog's usage estimation \`counter\` service traced back to four stacked bottlenecks rather than one.
- [June 25th, 2023 Deno Deploy Postmortem](https://swe.quest/articles/june-25th-2023-deno-deploy-postmortem-1566c666d1a88ac0.md): Deno · 2023-06-30 · Easy · 2 min read · Incidents & postmortems, Resilience, Scaling, Serverless
  A DDoS attack on one site hosted on Deno Deploy drove traffic to about 10x normal and took down Deploy projects, deno.com and deno.land for 44 minutes on June 25, 2023.
- [How we halved DNS build delay and cut memory use by 85%](https://swe.quest/articles/how-we-halved-dns-build-delay-and-cut-memory-use-by-85-571d0d573d8e7634.md): Cloudflare · 2026-11-02 · Hard · 15 min read · DNS, Scaling, Queues & messaging, Performance engineering, Testing
  Cloudflare's DNS Zone Builder now uses a targeted build planner that picks the smallest provably safe build (resources only, resources plus metadata, apex plus metadata, purge, or full zone) and a unified per-zone scheduler that merges queued work.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
