Hi Jones,

On Sat, Oct 13, 2012 at 06:48:11PM -0700, Allteams Jones wrote:
> Hi,
> 
> I'm trying to find the best way to proxy a few thousand TCP clients and make
> sure each one connects to their own backend server. Essentially I have a few
> hundred DB servers and each one of them belongs to a single client. I want to
> have a single HAProxy server and based on the destination TCP port, use the
> appropriate backend. Those connections need to be persistent and security is
> not an issue (DB authenticates client). What is the best way to go about
> this? Should I define a few thousand ACLs or define a separate section for
> each port<->DB mapping?

What you describe sounds exactly like the simplest relaying configuration :
  - defaults section for all common settings (mode tcp, timeouts, ...)
  - one listen section with "bind" for the listening port and "server"
    for the server, per client.

It also has the benefit of being more debuggable and observable (eg: think
about the stats).

Hoping this helps,
Willy


Reply via email to