DNS
DNS (Domain Name System) is the “phone book of the internet”. Whenever you, for example, enter a domain name like www.noris.net in your web browser, it is first translated into an IP address (for www.noris.de, roughly 213.95.240.5 and 2001:780:6:901::5), which is then used to establish a data connection. To do this, your computer generally queries a so-called DNS resolver, usually a server operated by the provider through which your internet connection was established; at noris network these are, for example, ns.noris.net and name.noris.net. See also Important servers.
This resolver obtains its information from the authoritative DNS servers of the provider/registrar that manages the respective domain from a DNS perspective. Once queried, the resolver remembers the information locally and answers further queries for the same records from this cache (DNS cache), without querying the primarily responsible authoritative DNS servers again, this mainly serves to shorten response times.
This so-called “DNS caching” becomes a problem, however, when DNS records need to be changed, for example because a service is moving to a new server system: while a change on the authoritative DNS servers can generally be made within seconds, access to the old address can still occur even after this change, since it is still stored in the DNS resolvers of many providers.
DNS caching can be controlled individually for each DNS record via the so-called TTL (Time To Live): this TTL determines how long a resolver may store the record locally before it should query one of the servers authoritative for the domain again, in order to notice a change to the record. This TTL is usually set to one day, meaning that after a change you must still expect access to the previously configured address(es) for around 24 hours.
To shorten this time span, the TTL for a record that is about to be changed can be lowered early, usually to a value of five minutes (300 seconds). Once it is certain that the DNS change is final, the TTL can be raised back to its normal value at the time of the actual change to the record. Otherwise, it should initially remain lowered, so that switching back to the old state (“stepback”) also takes effect within a few minutes if needed.
If you want to ensure that all access moves to the new system within a few minutes of a change, proceed as follows:
- The TTL of the record to be changed must be shortened to five minutes well before the planned change (at the latest one day before), or correspondingly earlier if the record’s TTL was set to more than one day.
- The actual change (e.g. of the IP address) is carried out at the planned time.
- Once it is certain that the DNS change is final, the TTL should be normalized again to benefit from the advantages of DNS caching.
