You can also write a script that gather instances' data (using the EC2 APIs) in order to get the IPs. That way you can update the HAProxy configuration files when a change in your setup occurs.
Cheers, Michele On Feb 8, 2012, at 5:33 PM, Mir Islam wrote: > Right, the internal IP changes since it is on DHCP. But I was thinking of > assigning static IP (EIP in Amazon term) to the HAProxies. And then refer to > each other via those EIP. Here is a quick and dirty diagram of howI am > thinking of implementing. Ofcourse the main cost is the static IP addresses > that I have to get from Amazon.