Re: HAProxy in Amazon EC2 in peer mode

2012-02-08 Thread Baptiste
Hi,

This kind of scenario is really dependent from your configuration.
Basically, you want to configure HAProxy to load-balance SSL services
hosted by your application servers.
Persistence based on SSLID into HAProxy, sharing the stick-table
between both haproxy.
This may work, but be carefull with the peers section, since your LB
will change their IP addresses each time they'll reboot...

cheers


On Tue, Feb 7, 2012 at 1:56 AM, Mir Islam mis...@mirislam.com wrote:
 Hi, I am thinking of the following scenario to implement in AWS.

 Two HAProxies with SSL stickiness, TCP pass through and in peer mode. Using 
 Amazon ELB to do round robin load balance between the two server. Basically 
 the idea is to create automatic failover for HA proxy servers. Theoretically 
 it should work since both of the servers have the same session information. 
 Am I wrong on this assumption?

 Thanks
 Mir



Re: HAProxy in Amazon EC2 in peer mode

2012-02-08 Thread Michele Mazzucco
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. 




Re: HAProxy in Amazon EC2 in peer mode

2012-02-08 Thread Mir Islam
Just in case anyone was following in my effort to get HAProxy running in EC2. 
The peers mode will not work in EC2 because the IP address identified in the 
peer section must be an ip which is bound to the interface. I could not find a 
way to bypass it. Since the static IP assigned in EC2 are not really bound to 
the interfaces on the vm itself, it appears for the time being it is not 
possible to run in peer mode with static IP. It is possible to use the internal 
10.x.x.x IP assigned by Amazon but that may change after a reboot. Oh, well I 
guess it is what it is.
On Feb 8, 2012, at 7:33 AM, Mir Islam wrote:



 
 On Feb 8, 2012, at 2:49 AM, Baptiste wrote:
 
 Hi,
 
 This kind of scenario is really dependent from your configuration.
 Basically, you want to configure HAProxy to load-balance SSL services
 hosted by your application servers.
 
 That is correct.
 
 Persistence based on SSLID into HAProxy, sharing the stick-table
 between both haproxy.
 
 Right, that way any one of the pair of HAProxy server would know where to 
 send the request from client.
 
 This may work, but be carefull with the peers section, since your LB
 will change their IP addresses each time they'll reboot...
 
 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. Thanks Baptiste.
 
 
 
 
 PastedGraphic-1.pdf
 
 cheers
 
 
 On Tue, Feb 7, 2012 at 1:56 AM, Mir Islam mis...@mirislam.com wrote:
 Hi, I am thinking of the following scenario to implement in AWS.
 
 Two HAProxies with SSL stickiness, TCP pass through and in peer mode. Using 
 Amazon ELB to do round robin load balance between the two server. Basically 
 the idea is to create automatic failover for HA proxy servers. 
 Theoretically it should work since both of the servers have the same 
 session information. Am I wrong on this assumption?
 
 Thanks
 Mir
 




Re: HAProxy in Amazon EC2 in peer mode

2012-02-08 Thread Baptiste
welcome to the cloud :)

On Thu, Feb 9, 2012 at 2:26 AM, Mir Islam mis...@mirislam.com wrote:
 Just in case anyone was following in my effort to get HAProxy running in EC2. 
 The peers mode will not work in EC2 because the IP address identified in 
 the peer section must be an ip which is bound to the interface. I could not 
 find a way to bypass it. Since the static IP assigned in EC2 are not really 
 bound to the interfaces on the vm itself, it appears for the time being it is 
 not possible to run in peer mode with static IP. It is possible to use the 
 internal 10.x.x.x IP assigned by Amazon but that may change after a reboot. 
 Oh, well I guess it is what it is.
 On Feb 8, 2012, at 7:33 AM, Mir Islam wrote:




 On Feb 8, 2012, at 2:49 AM, Baptiste wrote:

 Hi,

 This kind of scenario is really dependent from your configuration.
 Basically, you want to configure HAProxy to load-balance SSL services
 hosted by your application servers.

 That is correct.

 Persistence based on SSLID into HAProxy, sharing the stick-table
 between both haproxy.

 Right, that way any one of the pair of HAProxy server would know where to 
 send the request from client.

 This may work, but be carefull with the peers section, since your LB
 will change their IP addresses each time they'll reboot...

 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. Thanks Baptiste.




 PastedGraphic-1.pdf

 cheers


 On Tue, Feb 7, 2012 at 1:56 AM, Mir Islam mis...@mirislam.com wrote:
 Hi, I am thinking of the following scenario to implement in AWS.

 Two HAProxies with SSL stickiness, TCP pass through and in peer mode. 
 Using Amazon ELB to do round robin load balance between the two server. 
 Basically the idea is to create automatic failover for HA proxy servers. 
 Theoretically it should work since both of the servers have the same 
 session information. Am I wrong on this assumption?

 Thanks
 Mir





Fwd: HAProxy in Amazon EC2 in peer mode

2012-02-07 Thread Mir Islam
Any taker?

Begin forwarded message:

 From: Mir Islam mis...@mirislam.com
 Date: February 6, 2012 4:56:15 PM PST
 To: haproxy@formilux.org
 Subject: HAProxy in Amazon EC2 in peer mode
 
 Hi, I am thinking of the following scenario to implement in AWS. 
 
 Two HAProxies with SSL stickiness, TCP pass through and in peer mode. Using 
 Amazon ELB to do round robin load balance between the two server. Basically 
 the idea is to create automatic failover for HA proxy servers. Theoretically 
 it should work since both of the servers have the same session information. 
 Am I wrong on this assumption?
 
 Thanks
 Mir



HAProxy in Amazon EC2 in peer mode

2012-02-06 Thread Mir Islam
Hi, I am thinking of the following scenario to implement in AWS. 

Two HAProxies with SSL stickiness, TCP pass through and in peer mode. Using 
Amazon ELB to do round robin load balance between the two server. Basically the 
idea is to create automatic failover for HA proxy servers. Theoretically it 
should work since both of the servers have the same session information. Am I 
wrong on this assumption?

Thanks
Mir