A site name and a server address are different things
What DNS does
People open sites by name, such as example.test. Connecting requires a server network address. DNS maps names to addresses. A resolver finds that record and returns it to the client. The client then sends an HTTP request to the application. DNS therefore appears as a separate branch in the diagram, not an intermediate server for every HTTP response.
Why cache an address
Many clients may query the same names. A resolver stores answers and reuses them during TTL, the record’s lifetime. This stand has 100 names and 600 accesses per second. Refreshing 100 records every 5 seconds puts an average load of 20 queries per second on authoritative DNS instead of 600. Brief refresh spikes remain visible in the calculation. The authoritative DNS server holds the original name records.
What happens when the address changes
At second 30, applications move to new addresses. The resolver does not discover this immediately: it may return the old answer until TTL expires. A long TTL saves queries but extends use of the old address. Here the old server becomes unavailable immediately. Real migrations often allow a transition period and lower TTL in advance.
What to check in the result
Compare DNS query count, requests to the old address and resolution latency. All three matter together. A 120-second TTL gives few refreshes but fails the address change in this experiment. Browser cache, TCP, TLS and network loss are excluded: this model studies name resolution specifically.
Task
600 new requests/s to 100 names. Authoritative DNS handles 100 queries/s. Addresses change at second 30. Add a resolver and find a TTL that cuts queries without keeping the old address.
60 steps of 1 s, with 100 equally requested names. Without a resolver, every new session queries authoritative DNS. The resolver refreshes a batch of 100 records on TTL expiry, starting at 0 s. All addresses change at 30 s; requests to old addresses fail. Client DNS cache, TCP/TLS and retries are not modeled.
- Add a DNS resolver from the palette.
- Change TTL and compare DNS queries with losses after an address change.
- Check the solution at the initial 600 requests/s.