We are using haproxy to load balance inbound SMTP traffic across several servers. At present the load-balancing is done via the 'leastconn' algorithm within haproxy.

We are trying to add some intelligence to give us control over how inbound SMTP traffic is routed in the event that one or more of those SMTP servers are in a sub-optimal state, and that state cannot be determined from a simple connection (or lack thereof) to port 25.

(As a simple example, one of the servers may have a very high queue, which would not impact its ability to receive new messages via port 25, but we would want to reduce traffic to that particular server.) Without going into too much more detail, the load-balancing algorithms within haproxy will not have sufficient information to reroute traffic the way we would like to.

The ideal scenario for us would be for haproxy to issue an HTTP check (even though the incoming connections are for an smtp service) to a destination server in the pool, and upon receiving a 4xx or 5xx level response, haproxy would pull that server out of the pool, thus not allowing new SMTP connections -- however not terminating existing connections.

Is this possible?



--

Eric Schwab
Internet Integration, Inc.
http://www.i-3.com
Tel: 310-571-3200
Fax: 310-571-3434

Reply via email to