Hi,

My answers inline.


> ##start
> listen tcp 0.0.0.0:225
>          mode tcp
>          option tcplog
>          balance leastconn
>          maxconn 10000
>          server smtp1 192.168.25.1:25 maxconn 10
>          server smtp2 192.168.25.2:25 maxconn 10
> ##end
>
> So when I have more then 10 connections haproxy will try the second server.

No
It means no server will deal with more than 10 connections at a time.
If one of them reach 10 connections, then all the new incoming
connections will be sent to the other server until it reaches 10
connections.
Then connections are queued, waiting for a server to finish to process
some requests.

The leastconn algorithm just means that HAProxy will deliver the next
request to server with the less active connections at the moment he
has to choose the server to open the new connection.

>
> Eliezer
>

Baptiste

Reply via email to