S3U
All audio lessons

Science / Grade 8

When a name answer expires

Learning goal: Compare a DNS source record with a cached answer, calculate expiry and keep page-service availability separate.

Before you start: Add and subtract whole-number times. Every time, lifetime, address ending and service state needed for the question is spoken. Pause to write the records or replay them; no diagram or real network changes are needed.

Read or print this lesson What to practice

Watch this lesson instead

Two labeled records distinguish a name-to-address answer from a page request that uses the address.

Audio and video share one lesson record. Keep this page open while listening.

Download audio Downloads do not save lesson progress.

Next: your worksheet

DNS Cache Lifetimes - Observatory Records

Continue to worksheet
Not started 0s active

Checking sign-in...

Read the transcript

Audio transcript and practice. Reading or printing does not count as playback time or an assessed grade.

1. A name answer is not a page

Audio: 0:00

Video illustration: A name answer is not a page. The spoken explanation follows.
A name answer is not a page: video illustration

Our pretend observatory wants the Atlas page, but its name answer still points to Mirror. We will separate three things: the source record, a saved copy of its answer, and the page request made using that address. The domain name system, or D N S, helps look up information about names. It does not promise that a page service works. All addresses in this lesson begin with one ninety-eight, fifty-one, one hundred. Atlas ends in forty. Mirror ends in forty-one. Do not contact or configure these example addresses.

2. Give the copy an expiry

Audio: 0:41

Video illustration: Give the copy an expiry. The spoken explanation follows.
Give the copy an expiry: video illustration

At model second ten, our resolver obtains the address ending in forty-one and keeps a copy. The answer has a time to live of forty seconds, usually called T T L. Add the time obtained and its lifetime: ten plus forty is fifty. In this simplified model the copy may answer requests before second fifty. At second fifty it has expired. The next lookup must ask our always-available source again. Forty seconds is the lifetime, not the clock reading at expiry.

3. The source changes first

Audio: 1:18

Video illustration: The source changes first. The spoken explanation follows.
The source changes first: video illustration

At second twenty, someone corrects the source record to Atlas, ending in forty. This source is called authoritative for the name. Our resolver still has its earlier copy ending in forty-one. Changing the source does not reach into that already-saved copy and rewrite it. Keep two columns: what the source says now, and what this resolver remembers. The cache did not receive a tiny messenger shouting, new address! It has its own remaining lifetime, and we must check that before choosing an answer.

4. A hit does not restart the clock

Audio: 1:55

Video illustration: A hit does not restart the clock. The spoken explanation follows.
A hit does not restart the clock: video illustration

Now a request arrives at second thirty-five. The saved copy expires at fifty, leaving fifteen seconds. The resolver uses its cached address ending in forty-one, so this request goes toward Mirror. That is a cache hit. Reading the copy does not restart its forty-second lifetime. Another request at second thirty-five still leaves fifteen seconds, not forty. A reachable wrong page does not mean the route was broken. Here the address answer selected a different service from the one we wanted.

5. Refresh on the next expired lookup

Audio: 2:33

Video illustration: Refresh on the next expired lookup. The spoken explanation follows.
Refresh on the next expired lookup: video illustration

At second fifty, the old copy has no time left. A lookup at that moment asks the source again. It now obtains Atlas, ending in forty, with another forty-second lifetime. This new copy expires at ninety. Notice that expiry by itself did not send a background lookup in our model: the request at fifty triggered the refresh. Waiting without correcting the source would only obtain the wrong address again. Real resolvers have more policies; this exercise has one cache, no prefetching and an always-available source.

6. Correct address, stopped service

Audio: 3:13

Video illustration: Correct address, stopped service. The spoken explanation follows.
Correct address, stopped service: video illustration

Suppose the new address correctly reaches Atlas, but its page service is stopped. The address lookup worked; the page did not. Start the pretend service, then make another page request. It can now succeed with the same address and the same expiry time. You did not need to wait for D N S to forget a correct answer. A D N S cache stores naming information. A browser or content delivery network may separately cache page content. Those are different copies, not one universal refresh button.

7. Pause: read a fresh record

Audio: 3:51

Video illustration: Pause: read a fresh record. The spoken explanation follows.
Pause: read a fresh record: video illustration

Pause for a different record. A resolver obtains the old address ending in forty-one at second two hundred, with a lifetime of fifteen seconds. The source changes to Atlas, ending in forty, at second two hundred four. No other lookup happens until the requests we are about to test. Which address is used at second two hundred fourteen? Which is used at second two hundred fifteen? If a new copy is obtained then with the same fifteen-second lifetime, when does it expire? Write the expiry calculation first, then explain the two requests.

8. Check the boundary exactly

Audio: 4:32

Video illustration: Check the boundary exactly. The spoken explanation follows.
Check the boundary exactly: video illustration

Two hundred plus fifteen gives an expiry of two hundred fifteen. At two hundred fourteen, one second remains, so the old address ending in forty-one is used. That hit does not extend the expiry. At two hundred fifteen, the copy has expired. The lookup obtains the corrected address ending in forty and a new fifteen-second lifetime. Two hundred fifteen plus fifteen is two hundred thirty. This answers the naming question only. Whether Atlas returns a page still depends on the route and the page service in the supplied records.

9. Fun fact: copies can disagree

Audio: 5:14

Video illustration: Fun fact: copies can disagree. The spoken explanation follows.
Fun fact: copies can disagree: video illustration

Fun fact: two resolvers can hold copies of the same answer with different time left. If one obtains a twenty-second copy at second seven, its expiry is twenty-seven. Another obtains one at twelve; its expiry is thirty-two. At twenty-seven, one has expired while the other has five seconds left. Different observations need not mean someone changed the source twice. Real D N S includes additional behavior, including policies for unavailable sources. Our always-available-source model leaves that out and does not diagnose your device or our website.

10. Continue to the worksheets

Audio: 5:57

Video illustration: Continue to the worksheets. The spoken explanation follows.
Continue to the worksheets: video illustration

Continue to the first worksheet and read its new times, not the totals from this video. Mark when the copy was obtained, add the stated lifetime, and compare each request with the expiry. Keep the current source and cached answer separate. Then try the second worksheet, which has another set of records. Finally, investigate the last two repairs in Network Workshop using its model clock. Explain why a lookup succeeds or fails separately from the page service. Watching and guided play support learning, but your independent practice provides different evidence.

Show your understanding

You can point, explain aloud, draw or write.

  • Calculate a cached answer's expiry and remaining lifetime without renewing it on a hit.
  • Choose between an unexpired copy and the current source at expiry, then explain page availability separately.

Try it yourself

Pause at the fresh 200/15 record. Explain the answers at 214 and 215, then calculate the refreshed copy's expiry.

Continue to both worksheets, then Network Workshop repairs 13-14. Use each new set of times; no real network access is needed.

Next: your worksheet

DNS Cache Lifetimes - Observatory Records

https://s3u.com/sn8d1

Practice Two: another cache log · Practice cache lifetimes and page availability · Investigate in Network Workshop

Lesson: https://s3u.com/listen/when-a-name-answer-expires