How do DNS-based load balancing and failover work, and what are their limits?

AdvancedConceptDNS
Answer

The authoritative server returns different or multiple A records, optionally filtered by health. Clients pick one and cache it for the TTL, so failover takes at least TTL plus client retry time, and you have no control over client behavior.

Some clients cache beyond TTL (long-lived JVMs with networkaddress.cache.ttl, connection pools). For fast failover use a load balancer or anycast in front and treat DNS as coarse steering.

All Networking questions Roadmap: Networking for DevOps

More on DNS