Skip to content
Engineering

DNS

Definition

DNS stands for Domain Name System, which is a system that translates human-readable domain names into IP addresses that computers can understand. This allows us to access websites and online services using easy-to-remember names instead of complex IP addresses.

Diagram

A DNS lookupTo visit shop.com, the browser checks its cache, then asks a resolver. The resolver asks a root server, which points to the .com servers, which point to shop.com’s own name server, which returns the IP address. The resolver caches the answer and passes it back to the browser.Browserchecks its cacheResolveryour ISP or a public oneRoot server“ask .com”.com server“ask shop.com’s servers”shop.com’s server“203.0.113.10”123Then:the resolver caches the addressfor its time to live (TTL), and thebrowser connects to 203.0.113.10.Most lookups stop at a cache and take a few milliseconds.
Caching is why DNS changes “take time to spread”: resolvers keep the old answer until its TTL runs out. Lower the TTL a day before moving a site, and changes take effect in minutes instead of hours.

Case study

Worked example