DNS por delante
Pon DNS delante de varios Balanceadores de carga para que el punto de entrada no sea una sola máquina, y ajusta su TTL a la rapidez de failover que necesitas.
Point the domain at DNS, and let DNS hand out the addresses of two or more Load Balancers.
Move up when#
The Load Balancer is itself the single point of failure.
Users can take only one link, and you need more than one entry point.
The Design#
Drag to pan. Hold Ctrl or Cmd and scroll to zoom.
| Where | Setting | Value | Why |
|---|---|---|---|
| DNS | TTL (s) | 3600 | Resolvers keep the answer this long, so a dead Load Balancer keeps getting its share for as long. |
| Load Balancer | State | Down | This Load Balancer died a minute before the picture. |
| App Server | Instance size | small | Two equal servers behind both balancers. |
| App Server | Instance size | small | Two equal servers behind both balancers. |
| Database | Instance size | medium | Medium, shared by both servers. |
Research this Design needs: DNS round robin, Load balancing, Health checks.
Drag to pan. Hold Ctrl or Cmd and scroll to zoom.
| Where | Setting | Value | Why |
|---|---|---|---|
| DNS | TTL (s) | 30 | A short answer lifetime lets DNS drop a dead Load Balancer within seconds, at the price of more lookups. |
| Load Balancer | State | Down | The same Load Balancer, down for the same minute. |
| App Server | Instance size | small | Two equal servers behind both balancers. |
| App Server | Instance size | small | Two equal servers behind both balancers. |
| Database | Instance size | medium | Medium, shared by both servers. |
Research this Design needs: DNS round robin, Load balancing, Health checks.
Both pictures show one minute after a Load Balancer died. DNS splits traffic evenly between two Load Balancers, and both reach the same two App Servers. A long TTL keeps sending users to the dead one. A short TTL has dropped it.
Why it works#
DNS answers are cached by resolvers for the TTL. With a long TTL, half the requests keep going to the dead Load Balancer until the TTL runs out. With a short one, DNS stops handing out the dead address within a lookup or two, and errors return to zero.
What it costs#
DNS has no health checks until you research them, so a dead host keeps its share. It also ignores size, so a small host gets as much as a large one. A short TTL means more lookups, and some resolvers hold answers longer than you ask. The TTL is a promise about the best case, not a guarantee.
In Quorum#
The DNS Component unlocks with DNS round robin. Changing the TTL needs Health checks, and DNS drops a dead host only once your Team has also built the Health check endpoint. The glossary defines DNS round robin. The next step is static files on object storage and a CDN.