I have 1 instance each in 2 regions (US West and EU London) in Amazon EC2. I would like to achieve following:
Distribute traffic based on regions:
For example: if the request originates from US then use US Region and if the request originates from UK then use EU Region
Backup:
In case of failure, the requests are directed to the working instance
I have tried to search for such scenarios but I only found one or the other but nothing that provides solution for both the scenarios.
Classic Load Balancing:
- If US instance fails, the requests are automatically directed to EU instance.
- But, when both the instances are running, the requests will be balanced and divided (irrespective of where the request originated from)
Application Load Balancing:
- I could set different URLs for US and EU and use application load balancing to direct requests to the instance of the respective region.
- But if US instance fails, the requests won't be directed to EU instance.
Amazon Route 53:
- Use Geo-location Routing
- Example on Geo-location Routing
- Using Health Check configure DNS failover: