On Wed, Jan 25, 2012 at 10:07:28AM +0100, Baptiste wrote:
> Hi,
> 
> Using HAProxy, your flow will look like below:
> 
> client sends a event to Haproxy
> haproxy recieves event, it selects the server from pool
> haproxy will submit the event
> haproxy will get response from server
> haproxy will send response back to client
> haproxy will wait for another event from same client
>   [ repeat the sequence as many time as needed ]
>   { if a timeout client or server occurs, HAProxy closes both connections }
> client closes the connection to haproxy
> haproxy closes connection to server
> server acknoledge connection close to haproxy
> haproxy acknoledge connection close to client
> 
> In TCP mode, haproxy never closes a connection unless a timeout occurs.

... or any side closes, of course :-)

To be more precise, there is no notion of request or response in TCP
without knowing the upper protocol. What Rajiv described here is exactly
how HTTP works because HTTP is composed of messages with boundaries that
haproxy knows how to detect. But "TCP" is a stream, there is no boundary,
so no end of response, etc...

However if your protocol is simple enough, it might make sense to try to
implement it, maybe even merging it into haproxy if other people are
using it.

Regards,
Willy


Reply via email to