HAProxy myltiplex

Hello Guys, help me please. I’m new and have little experience. There is a task, a permanent TCP connection to the LDAP server. There are several options. Nginx, HAProxy, ssh multiplexing. I settled on HAProxy. But I can’t figure out if it can observe a TCP-enabled connection. This is necessary so that each new request does not open a new connection to the server, and use the existing one. Can you suggest what I can use for this?

Haproxy does not support the LDAP protocol specifically, this means that one client (frontend) TCP connection will lead to on server (backend) TCP connection. Once one side closes the connection, the close will be replicated to the other side. There is always a 1:1 relation between a TCP connection on the frontend and a TCP connection on the backend.

If I understand you correctly, what you want is that multiple frontend/client connection use a single (or minor number) of backend/server connections, is that correct?

I’m afraid you need a LDAP-aware proxy, like openldap (see slapd-ldap - LDAP backend to slapd).

Hi. Main task - it’s multiplexing connection. I receive a response from LDAP server. But for each new request a new connection is opened.

Multiplexing means a one to many relationship between frontend and backend connections, which haproxy cannot do. None of the HTTP/TCP proxies can. You need a LDAP aware proxy for that.

A one to one relationship between frontend and backend connections can be achievied with haproxy, by a simple tcp mode configuration.

My scheme is: application(make request “ldapsearch…”.) ==> HAProxy(redirect request from application to LDAP server) ==> LDAP server

My goal is to use one TCP connection between HAProxy and LDAP server for all requests from application.

Which is not possible with haproxy. You need a LDAP aware proxy.

Thanks. Can you recommend any?

I did, in the first response in this thread:

Thanks