Hi Julien,

On Tue, Apr 12, 2011 at 05:12:40PM -0400, Julien Vehent wrote:
> 
> 
> On Tue, 12 Apr 2011 22:59:19 +0200, Guillaume Castagnino wrote:
> >option http-server-close is sufficient and allow client side 
> >keep-alive.
> >Moreover, to achive a good load balancing, server side keepalice
> >NEEDS to be disabled (with http-server-close
> >option) since mutiple connections inside one keep-alive session are
> >not balanced...
> >
> 
> 
> That is correct.
> However, I suspect that tomcat uses a lot of resources when a 
> connection is established, that why I wanted to test it with keepalive.

>From what I observed, it uses a lot less ressources to accept a new
connection than when keeping it open. Keep-alive on threaded servers
is terrific. It prevents you from scaling, because you keep a lot of
idle connections open which eat a lot of resources. It will only bring
a benefit when we're able to maintain a connection pool and load balance
all requests over those established connections.

> So, there is no way to have haproxy send the x-forwarded-for with each 
> requests of the keepalived connection ?

No, simply because server-side keep-alive is still being worked on and is
not implemented yet. What you're observing is not keep-alive but what we
call "tunnel mode" : the first request/response is analysed then everything
flows between both sides, it's just pure TCP and nothing is analysed. No
content switching is performed, no filtering, no cookies, etc... You should
not need this mode at all.

Regards,
Willy


Reply via email to