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?
You can do this with Amazon Route 53 which now supports Multi-Region Latency Based Routing.
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.
To use Route53 to do GSLB you need to :
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
Well, this is a common problem called Geographical Load Balancing, and I think that Amazon Web Services team have done good points with ELB.
Here on the ELB Guide, you can view how to add EC2 instance and, this show too the availablity zones of your ELB:
and here, you can see a detailed post about how to install ELB
Other resources to use CoyotePoint Systems Inc have a solution for this, and F5 too
regards and best wishes