Using ELB Across Multiple Regions

14,974

Solution 1

You can do this with Amazon Route 53 which now supports Multi-Region Latency Based Routing.

Solution 2

To use Route53 to do GSLB you need to :

  1. have your ELBs in the same account
  2. have your Hosted zone in that same account as the ELBs
  3. In route53 create Alias records, and choose IPv4 and choose the ELBs from the drop down list of resources to add primary and secondary (for a Failover scenario)

then add latency records on top of that if needed which all point to the same The key is to choose the ipv4 for aliases (not obvious to me)

My issue is that since my ELBs are in different accounts, and the ELBs use hostname/CNAME records, GSLB cannot point LB pool records to CNAMES, only A-Records which AWS doesn't want you to point to.
https://www.rfc-editor.org/rfc/rfc1034 section 3.6.2

Solution 3

You cannot do this with the ELB. Consider using a DNS provider who offers GSLB (Global Server Load Balancing) or similar services.

That said, you don't need GSLB. You can start considering GSLB when you have several hundred servers across several AZs in us-east-1. Oh, and revenue.

Share:
14,974

Related videos on Youtube

whobutsb
Author by

whobutsb

Lead Developer of Trendyr.com. PHP, Javascript, HTML5, Cloud-Computing aficionado. Electronic Music Enthusiast.

Updated on September 18, 2022

Comments

  • whobutsb
    whobutsb over 1 year

    Let say I have the website domain http://myawesomesite.com, and to start I have a ELB setup on the US-EAST Region with 2 instances running my application.

    As the site becomes more awesome and I want to start serving my application faster I setup instances in the US-WEST group, with an ELB. How can I forward traffic to the nearest data center?

  • ceejayoz
    ceejayoz over 12 years
    ELB doesn't do geographic load balancing yet.
  • rob2universe
    rob2universe almost 6 years
    Routing is configured in Route53, not on the ELB
  • Daywalker
    Daywalker over 5 years
    As a slight improvement, I'd suggest the following setup per site: A Reagion Based DNS routing via Route53 point to a loadbalancer per region. Behind every Loadbalancer can be n+1 amounts of Webservers handling the requests (maybe even with a Autoscaling group to automatically adapt to the load changes)