I have been reading about haproxy usage in Amazon clouds however, but could not find anything related to load distribution load between backends that are also in the cloud.
I have been experimenting with uri based consistent hashing which haproxy offers. Haproxy takes backend server names from the config and attempts to resolve them right away. Naturally, the cloud backend addresses needs be elastic so the stay the same. However, elastic Ips are not exactly what they seem. While the public DNS names and addresses remain the same, for within the cloud connections they still resolve to internal 10 dot addresses. Those can change when instances go up and down. Because haproxy caches the actual addresses from the start it presents a problem. The only solution that I could think of is to have a side cron job that would check for the backend addresses change and force haproxy graceful restart. This creates an outage window however small. While haproxy is a old school design that avoids playing with dynamic DNS, this is the cloudy reality. It would be nice if there was a way to ask haproxy to re-resolve backend entries. Is there any other solution out there? Am I missing something? Thanks, Dmitri

