Re: HA for HAProxy in Amazon Cloud
On 11/17/2011 10:55 PM, Mir Islam wrote: Hi Guys, I am wondering how people are solving the problem of HAProxy becoming SPOF. I am using HAproxy in Amazon cloud for SSL stick session and load balancing, but best solution I could come up with for making HAProxy HA is by having another exact instance as hot standby. Then monitor the active one periodically and if it goes down, move the elastic IP associated with HAP1 to HAP2. Is there some other way folks are solving this issue? Remember, on Amazon cloud instances they do not have any public IP associated with the actual interface. So can't create virtual interface/ip and move it around like in traditional heart beat type of systems. Thanks Mir Hi, I'm doing exactly the same. I set up an heartbeat 2 node cluster (active/passive), defined 2 custom ocf resources (the elastic ip and the haproxy daemon) and grouped them to act together. The most tricky part for me was the heartbeat monitoring function because AWS API calls are really slow and tend to time out. Anyway, haproxy is running nicely, so far we are getting ~300 r/s
hashing + roundrobin algorithm
Hello All, First of all, pardon me if I'm not communicating very well. English is not my native language. We are running a static file distribution cluster. The cluster consists of many web servers serving static files over HTTP. We have very large number of files such that a single server simply can not keep all files (don't have enough disk space). In particular, a file can be served only from a subset of servers. Each file is uniquely identified by a file's URI. I would refer to this URI later as a key. I am investigating deploying HAProxy as a front end to this cluster. We want HAProxy to provide load balancing and automatic fail over. In other words, a request comes first to HAProxy and HAProxy should forward the request to appropriate backend server. More precisely, for a particular key, there should be at least two servers being forwarded to from HAProxy for the sake of load balancing. My question is what load balancing strategy should I use? I could use hashing(based on key) or consistent hashing. However, each file would end up being served by a single server on a particular moment. That means I wouldn't have load balancing and fail over for a particular key. Is there something like a combination of hashing and roundrobin strategy? In particular, for a particular key, there would be multiple servers serving the requests and HAProxy selects one of them according to roundrobin policy. If there isn't such a stretegy, any suggestions on how to implement this into HAProxy? Any other comments are welcome as well. -- Best Regards, Rerngvit Yanggratoke
Re: HA for HAProxy in Amazon Cloud
So on avg how long it took for the AWS api call to transfer the IP to standby HA Proxy? I am wondering if it makes to go with just auto scale and define minimum 1 server. Thanks Mir On Nov 18, 2011, at 4:26 AM, Mariano Guezuraga wrote: On 11/17/2011 10:55 PM, Mir Islam wrote: Hi Guys, I am wondering how people are solving the problem of HAProxy becoming SPOF. I am using HAproxy in Amazon cloud for SSL stick session and load balancing, but best solution I could come up with for making HAProxy HA is by having another exact instance as hot standby. Then monitor the active one periodically and if it goes down, move the elastic IP associated with HAP1 to HAP2. Is there some other way folks are solving this issue? Remember, on Amazon cloud instances they do not have any public IP associated with the actual interface. So can't create virtual interface/ip and move it around like in traditional heart beat type of systems. Thanks Mir Hi, I'm doing exactly the same. I set up an heartbeat 2 node cluster (active/passive), defined 2 custom ocf resources (the elastic ip and the haproxy daemon) and grouped them to act together. The most tricky part for me was the heartbeat monitoring function because AWS API calls are really slow and tend to time out. Anyway, haproxy is running nicely, so far we are getting ~300 r/s
Re: HA for HAProxy in Amazon Cloud
Firts, sorry HAproxy list for the OT. I would say it takes an average of 5 seconds. Also please note that Amazon _seems_ to throttle your API requests if you exceed certain number of requests, sometimes the API failed with unable to connect to ... (I've noticed that while performing the monitoring function of the OCF resource) On 11/18/2011 03:34 PM, Mir Islam wrote: So on avg how long it took for the AWS api call to transfer the IP to standby HA Proxy? I am wondering if it makes to go with just auto scale and define minimum 1 server. Thanks Mir On Nov 18, 2011, at 4:26 AM, Mariano Guezuraga wrote: On 11/17/2011 10:55 PM, Mir Islam wrote: Hi Guys, I am wondering how people are solving the problem of HAProxy becoming SPOF. I am using HAproxy in Amazon cloud for SSL stick session and load balancing, but best solution I could come up with for making HAProxy HA is by having another exact instance as hot standby. Then monitor the active one periodically and if it goes down, move the elastic IP associated with HAP1 to HAP2. Is there some other way folks are solving this issue? Remember, on Amazon cloud instances they do not have any public IP associated with the actual interface. So can't create virtual interface/ip and move it around like in traditional heart beat type of systems. Thanks Mir Hi, I'm doing exactly the same. I set up an heartbeat 2 node cluster (active/passive), defined 2 custom ocf resources (the elastic ip and the haproxy daemon) and grouped them to act together. The most tricky part for me was the heartbeat monitoring function because AWS API calls are really slow and tend to time out. Anyway, haproxy is running nicely, so far we are getting ~300 r/s