2

I have 2 Nginx Load balancers, running on AWS, each with an elastic IP address. I want to implement fail-over on them.

Can I use Route53 to setup health check, so whenever one server goes down, then the traffic is routed to another server, based on IP? If this isn't possible then can I use CNAME or domain name to point to other IP in case one goes down?

3
  • Was an NLB or ALB not an option here? Oct 1, 2018 at 1:56
  • need to host 100+ssl, thats why
    – Farhan
    Oct 1, 2018 at 9:06
  • 1
    But a single TCP mode NLB would be able to failover your nginxes without touching tls/ssl/http Oct 1, 2018 at 10:20

1 Answer 1

1

Yes Route53 supports Health Checks where it can periodically make a HTTP request to each of your IPs and if any one fails to respond correctly it will be automatically removed from the DNS response until it recovers. See here for more details: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html

Hope that helps :)

5
  • Route53 can also do simple load balancing, latency or geographic based load balancing, or a few or things which may be useful to you. The routing should be done using alias records directly to resources, rather than using IPs.
    – Tim
    Sep 30, 2018 at 20:43
  • Actually this type of switchover will give a lot of delay during failover. i tried it and the failover happens after about 2-3 minutes, which is HUGE. i cannot face such downtime, in production environment
    – Farhan
    Sep 30, 2018 at 21:51
  • @Farhan ideally you'd have the traffic routed to both endpoints under normal circumstances, i.e. the clients will get both IP1 and IP2 and pick one. If IP1 dies then 1. the clients will still resort to the other IP in the response, and 2. R53 will notice and stop sending IP1 in the responses. You should see very little downtime. Unless you're routing everything to IP1 by default and once that fails wait for the DNS to start sending IP2. But that's not a recommended setup.
    – MLu
    Sep 30, 2018 at 21:55
  • You should ask a new more open / general question about the best way to do load balancing, rather than this very specific question. In general you should use managed services where possible, AWS ALB for example.
    – Tim
    Sep 30, 2018 at 23:44
  • Cannot use ALB, as i need hundreds of Unique SSL certificates on Load balancer as SSL termination. ALB only supports 25 per ALB
    – Farhan
    Oct 1, 2018 at 10:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .