Interview Prep/Real-World Interview/DNS, TLS and certificates

You changed the A record for api.example.com to a new load balancer an hour ago, but some users still reach the old server.

BeginnerTroubleshootingDNS, TLS and certificates
Answer

Likely causes → Resolvers cache the old record until its TTL runs out. If the TTL was 86400, some users will see the old IP for up to a day. Long-lived clients (JVMs, mobile apps, keep-alive connections) can hold the old IP even longer.

Diagnose →

dig +noall +answer api.example.com @8.8.8.8
dig +noall +answer api.example.com @ns-123.awsdns-15.com   # authoritative answer
dig +noall +answer api.example.com @1.1.1.1                 # remaining TTL in column 2

Fix → Keep the old server running and serving (or proxying to the new one) until the old TTL has fully expired. You cannot purge other people's resolver caches.

Prevent → Lower the TTL to 60–300 seconds a day before any planned cutover, then raise it again afterwards. For load balancers, use Route 53 ALIAS records so the target can change without you editing IPs.

All Real-World Interview questions Roadmap: Interview readiness

More on DNS, TLS and certificates