Network Design and Operations
For a web server move, the IP address in the A record for www.example.com will be changed. The record's TTL is currently 86400 seconds, and to keep the time the old address is used after the change to about 5 minutes at most, the TTL will be lowered to 300 seconds beforehand. Resolvers cache records exactly for their TTL. Which is the correct deadline for lowering the TTL?
- A5 minutes before the change
- B1 hour before the change
- C24 hours before the change
Show answer and explanation
Answer: C. 24 hours before the change
A resolver that queried just before the TTL was lowered keeps the record cached for the old TTL of 86400 seconds, or 24 hours. Twenty-four hours after the TTL is lowered to 300 seconds, therefore, every resolver's cache holds the new record with the 300-second TTL. If the address is changed after that point, the old address is used for at most about 300 seconds (5 minutes). Once the change is complete and stable, the TTL is raised back to its original value to reduce the number of queries.
- A. With only 5 minutes, answers cached earlier with the 86400-second TTL can remain for almost 24 hours after the change.
- B. With only 1 hour, answers cached earlier can remain for up to 23 hours after the change.
- C. Correct. Once the old TTL of 86400 seconds (24 hours) has passed, every cache holds the record with the short TTL.