Question about TCP balancing

From: Dmitry Sivachenko <mitya#cavia.pp.ru>
Date: Mon, 3 Aug 2009 14:24:47 +0400


Hello!

I am trying to setup haproxy 1.3.19 to use it as TCP load balancer.

Relevant portion of config looks like:

listen test 0.0.0.0:17000

        mode tcp
        balance roundrobin
        server  srv1 srv1:17100 check inter 20000
        server  srv2 srv2:17100 check inter 20000
        server  srv3 srv3:17100 check inter 20000

Now imagine the situation that all 3 backends are down (no program listen on 17100 port, OS responds with Connection Refused).

In that situation haproxy still listens port 17100 and closes connection immediately:
> telnet localhost 17101

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

Is it possible to configure haproxy so it will stop listening the port when all backends are down? So clients will receive Connection Refused as if none listens TCP port at all?

Thanks in advance! Received on 2009/08/03 12:24

This archive was generated by hypermail 2.2.0 : 2009/08/03 12:30 CEST