HAProxy - TCP connection pooling

Hi there

Need some guidance.

  1. I have a server listening on a port with a number of pre-defined sessions/connections.
  2. HAProxy to open up number of persistent TCP connections with the server.
  3. Client uses short lived TCP connections with HAProxy (open → write/read → close)
  4. HAProxy uses an established connection to the server from the pool

How do I do this with HAProxy?

Thanks, Puneet

This is not possible, not with Haproxy and not theoretically.

Connection pooling requires all participants to understand when a application transaction starts and ends. This is the case for is possible for defined application protocols like HTTP.

But it cannot be done for undefined TCP protocols.

Therefore only HTTP can be supported for connection pooling.