DNS & Anycast Routing
Networking & DeliveryTranslates human-readable domain names into IP addresses, and — via anycast/geo-routing — is the very first hop that steers a user to the nearest infrastructure.
DNS (Domain Name System) resolves `api.example.com` to an IP address through a hierarchy of resolvers (root → TLD → authoritative nameserver), with heavy caching (TTLs) at every layer — your OS, your ISP's resolver, and public resolvers all cache results. In system design interviews, DNS matters for two reasons beyond 'name to IP': it's the first load-balancing decision point (via geo-DNS or anycast, a single IP can be broadcast from many physical locations and BGP routes each user to the nearest one), and its caching behavior directly controls how fast you can shift traffic during a deploy or failover.
How it connects
DNS & Anycast Routing as the source, with the components it typically interacts with.
- → Load Balancer: DNS (via GSLB/weighted records) is often the first layer of load balancing, directing users to the nearest regional load balancer.
- → CDN (Content Delivery Network): CDNs rely on DNS-based routing (anycast or geo-DNS) to send each user's request to the nearest edge POP.
- → Forward & Reverse Proxy: DNS resolves a hostname to the IP of a reverse proxy/edge server, which then terminates the connection and forwards internally.