Search code examples
amazon-web-servicesnginxamazon-route53

How do I route traffic to a secondary site if first one is down?


I have my site hosted on an EC2 instance using nginx and I use Route 53 to route traffic to it. Is it possible to have a setup where, if my EC2 instance is down for maintenance, I can have all traffic automatically routed to a different instance/server instead?

Where should I start looking/reading?


Solution

  • Yes, you can by setting up DNS failover in Route53:

    You can configure Route 53 to check the health of those servers and to respond to DNS queries for example.com using only the servers that are currently healthy.