Not sure I understand what your asking. Why does haproxy need to understand the protocol besides its TCP based? You can use haproxy today for things like MySQL, etc. All I am saying is having the ability to persist those connections, and when a client connects, one of the free connections is given to that client. Its very much like HTTP, stateless. It's just not using the HTTP protocol. For example if I wanted to build a service using Protobuffers or Thrift, which generates a custom binary protocol over TCP (changes depending on definition) there wouldn't be a way obviously to make haproxy understand. I am not expecting it too. Here is a patent about shmproxy (the software I was talking about at Yahoo)

http://www.patentstorm.us/patents/7325030/description.html

(Of course Yahoo's solution is much involved, providing such abilities to understanding some protocols to do things such as hashing against Session IDs, etc, but does have generic abilities to not understand the actual protocol)

On Oct 9, 2009, at 1:55 PM, Willy Tarreau wrote:

On Thu, Oct 08, 2009 at 06:22:58AM -0700, Chris Goffinet wrote:
I was wondering if anyone has considered or if its possible (am I
missing something?) to do connection pooling in haproxy for TCP
backends? We've been using haproxy internally at Digg and it's working
out really well. Before joining Digg, at Yahoo we had something very
similar to haproxy, that supported connection pooling. The general
idea is that once you start running multiple datacenters with multiple
backends, the latency of TCP ACK between those datacenters really
matters when failures start occurring and you need high availability
and failover of backend services.

The majority of our services are TCP based, not HTTP so keep alive is
out. I was wondering if this has ever been considered or possible
today? I can't find much info in the open source world regarding doing
such things, and thought I'd ask here.

I'm not sure I perfectly understand what you're looking for. If you
want to conserve pools of available established TCP connections, you
need haproxy to understand the protocol inside, so while that may be
possible for some protocols, it will certainly never be possible as
a generic mechanism. That's typically what HTTP achieves with keepalive
for example, but what TCP-based protocol do you have in mind ?

Willy



Reply via email to