Postmortem: How an Innocent DNS TTL Change Caused a Cascading Cache Stampede

· Daniel Lin dnspostmortemsre

Ahead of a regional database failover, we lowered the TTL on a heavily queried internal DNS record from 300 seconds to 5 seconds so clients would converge quickly. Twelve minutes later, unrelated API services started returning 502 errors.

Timeline and Root Cause

Corrective Actions

  1. Deployed NodeLocal DNSCache on every worker node so lookups hit loopback over TCP/UDP before leaving the host.
  2. Enforced a minimum 30-second TTL floor for high-QPS internal records and enabled CoreDNS prefetch so hot keys refresh asynchronously before expiry.
  3. Fixed the legacy HTTP client to reuse keep-alive transports across requests.
← Building Deterministic Container Images with Multi-Stage Distroless BuildsUnderstanding Write Amplification in NVMe SSDs Under WAL-Heavy Workloads →