Re: haproxy and weight (Solved)

2012-11-30 Thread Joop Boonen

Hi all,

This "issue" was caused by a configuration item:
stick on src table https
http://code.google.com/p/haproxy-docs/wiki/stick_on

Regards,

Joop.

On 2012-11-28 13:37, Joop Boonen wrote:

Hi,

I did some tests with HAProxy. It didn't act as I expected, may be my
expectation was wrong.

I have 3 servers that are hammering, with siege, a HAProxy ( 1.4.8)
with two apache servers behind it. The haproxy is configured with
balance roundrobin, cookie JSESSIONID prefix and stats socket
configured to control the HAProxy via hatop.

When I change the weight of one of the servers to 0%. New connections
still end up at this server from the server that was ending up at 
this

server are still forwarded to this server.
Only when I disable the server via hatop I see new connections moving
to the other server, regardless of cookies, and an active connection
like a download can continue until it has completed.
When the prefix JSESSIONID has been set and the server connected to
the prefix goes down the connection is moved to the other server. 
when
the cookie doesn't get changed the connection is moved back right 
away

when the server is up again.

I expected the following of the commands.

Change weight to 0% all connections except the active ones (still
downloading and with a cookie that show that certain server should be
used) move to the other server(s).

A disable server cuts all connections also the ones that are still 
active.


The reason I ask this because this way it would be the least service
effecting if you need to do some maintenance.

Set weight to 0%
Check how many active sessions in the application server.
If the amount is low enough, disable the application server via 
hatop.


Did I do something wrong, is this related to this server version, is
an issue that still exists?

Regards,

Joop.





haproxy and weight

2012-11-28 Thread Joop Boonen

Hi,

I did some tests with HAProxy. It didn't act as I expected, may be my 
expectation was wrong.


I have 3 servers that are hammering, with siege, a HAProxy ( 1.4.8) 
with two apache servers behind it. The haproxy is configured with 
balance roundrobin, cookie JSESSIONID prefix and stats socket configured 
to control the HAProxy via hatop.


When I change the weight of one of the servers to 0%. New connections 
still end up at this server from the server that was ending up at this 
server are still forwarded to this server.
Only when I disable the server via hatop I see new connections moving 
to the other server, regardless of cookies, and an active connection 
like a download can continue until it has completed.
When the prefix JSESSIONID has been set and the server connected to the 
prefix goes down the connection is moved to the other server. when the 
cookie doesn't get changed the connection is moved back right away when 
the server is up again.


I expected the following of the commands.

Change weight to 0% all connections except the active ones (still 
downloading and with a cookie that show that certain server should be 
used) move to the other server(s).


A disable server cuts all connections also the ones that are still 
active.


The reason I ask this because this way it would be the least service 
effecting if you need to do some maintenance.


Set weight to 0%
Check how many active sessions in the application server.
If the amount is low enough, disable the application server via hatop.

Did I do something wrong, is this related to this server version, is an 
issue that still exists?


Regards,

Joop.