Ch. 20 · Networking

DNS Resolution and Cached Answers

DNS Resolution and Cached Answers. Learn the reasoning, a practical example, common mistakes and an interview exercise.

~2 min readbeginnerupdated Oct 3, 2026

DNS maps names to records through a resolution process with caching. Different clients can observe different answers while caches and updates converge.

Before you start

You should understand clients, servers, IP addresses and ports. Follow a request through name resolution, connection establishment and application exchange. Distinguish protocol guarantees from deployment policy, and use observations from the relevant layer rather than guessing from one browser error message.

The practical goal is to reason through this situation: A changed address may work for one resolver while another retains an earlier answer. Read the walkthrough first, then try the interview exercise before opening its answer. The important part is explaining the decision and its consequences, rather than remembering a definition alone.

Step-by-step walkthrough

Step 1: Separate authority and cache

Authoritative records and recursive cached answers can differ temporarily.

Step 2: Compare TTL and families

IPv4 and IPv6 answers may lead to different destinations.

Step 3: Test destination health

A resolved address is not proof of a working application.

Worked scenario

A changed address may work for one resolver while another retains an earlier answer.

A site’s address changes from A to B. One resolver retains A until its cache policy allows refresh, while another already returns B. Compare authoritative and recursive responses, then connect to the observed address. If B resolves but fails TLS, the remaining problem is not repaired by repeating the DNS change.

Common mistake

DNS resolution success does not prove the service at the resolved address is healthy.

Verify the behavior

Compare answers and connection outcomes from two resolvers and both relevant address families.

Interview exercise

Diagnose a newly moved website.

Answer and reasoning

Compare authoritative and recursive answers, TTLs and address families, then test the actual destination separately.

Continue learning

Compare the scenario with the Networking interview questions and test your understanding with the Networking MCQs. For terminology and implementation details, consult the reference material.

More in Networking

read ✓Networking · mid

Networking: DNS Caching and TTL

Understand positive and negative caching, why changes are not instant, and how TTL trades propagation speed against query load.

~2 min readread →
read ✓Networking · easy

Networking: DNS Record Types

Read and choose DNS records: A and AAAA for addresses, CNAME for aliases, and MX and TXT for mail and verification.

~2 min readread →
read ✓Networking · mid

Networking: HTTP Redirects

Choose between 301, 302, 307 and 308, know which preserve the request method, and avoid caching and loop mistakes.

~2 min readread →
esc