dns
DNS
DNS is the global front door: it turns a name (api.example.com) into an address
before any request reaches your servers. It is also a routing layer — the same
lookup can hand different clients different answers (by region, latency, health,
or weight). Get it wrong and clients reach a dead region, fail over in minutes
instead of seconds, or cache a bad answer for hours. It is not a load balancer
and not a CDN; it decides which endpoint a client is told to use, not how bytes
are balanced inside that endpoint.
When to reach for this
A service is reachable by a stable hostname; traffic must be steered to the closest or healthiest region/data center; or an endpoint's IP can change (a new load balancer, a failover site) and clients must follow without code changes. Multi-region or multi-data-center designs need DNS to pick the entry point; single-region designs still need it for a stable, movable name.