On 28.04.2009 0:11 Uhr, Jeremy wrote:
> With the config below if I go to /test.php it sends it to the Linux
> server just fine. If I wait a while and go to /test.aspx it sends it to
> the Windows server just fine. But if I try both of them back to back,
> some sort of persistence is messing up the 2nd request... i.e. I go to
> /test.php and hit the Linux box, then if I go to /test.aspx immediately
> it still sends me to the Linux box instead of the Windows one.

This is actually a pretty common issue. HAProxy is currently not aware
of keep-alive-traffic. The routing decision is therefore based on the
first HTTP-request of a TCP-connection. That's why you see the first
request routed correctly. However, your browser keeps an open TCP
connection which is used to send the second request if it is issued in a
certain time frame. That request is then routed to the same server as
the first one of that particular connection.

The solution is as simple as adding

option  httpclose       # disable http keepalive

to your default section. This will simple disable keep-alive traffic.
For more details of the implementation see the documentation.

--Holger




Reply via email to