A microservice exhibiting a two-percent DNS error rate might seem negligible, but it can be enough to violate your service-level agreement. This article walks through a full diagnostic sweep from the application pod outward, covering the cluster DNS resolution path, CoreDNS topology, conntrack table fill under load, NodeLocal DNSCache behavior, and the metrics that reveal the active failure mode.
The 2% Error Rate That Breaks Your SLA
A seemingly small DNS failure rate can cascade into widespread service disruptions. Understanding where and why these errors occur is critical.
The Cluster DNS Resolution Path
Traffic flows from the pod to the DNS resolver, through the service mesh, and eventually to CoreDNS. Each hop introduces potential failure points.
CoreDNS Deployment Topology and Failure Modes
CoreDNS is typically deployed as a cluster service. Common failure modes include pod crashes, resource exhaustion, and misconfiguration.
The Conntrack Table Fill Under DNS Load
Heavy DNS traffic can fill the conntrack table, causing new connections to be dropped. This manifests as intermittent resolution failures.
NodeLocal DNSCache: Architecture and Diagnostics
NodeLocal DNSCache reduces latency and conntrack pressure by caching DNS responses locally. Diagnosing issues involves checking cache hit rates and DaemonSet health.
The CoreDNS Metrics Sweep and the Fix Patterns
Key metrics include coredns_dns_requests_total, coredns_dns_responses_total, and coredns_plugin_errors_total. Patterns in these metrics point to specific fixes, such as scaling CoreDNS replicas, tuning cache sizes, or adjusting conntrack limits.