On Tue, Feb 09, 2016 at 01:26:30PM +0000, GrĂ¼ninger, Andreas (LGL Extern) wrote:
> I would perform the health checks on exactly the ports which are used for the
> server definition.
> I would use the default port and add the offset. Exactly that what is done
> for the server definition.
There's no default port. The offset applies to the port the connection was
received on. Nowhere a single port is configured on your server and that's
why you have to tell the check what port you want to check.
For example it's possible to do this :
frontend f1
bind :1-1023
use_backend b1
frontend f2
bind :1024-4999
use_backend b1
backend b1
server remote 1.1.1.1:+10000
What's the first port for this server ? There is none. You only know that
you want to connect to the incoming port +10000.
And better now :
listen l1
bind :10000 transparent
server remote 1.1.1.1:+0
You configure your box to redirect all incoming traffic to port 10000 using
tproxy or nat. *all* your ports will be forwarded to the remote server. What's
the port you want to check here ? You don't know either.
> I understand that in the current implementation of haproxy ONLY the first
> port (8162) is used for the health-check.
There's no such "first port", there's not even any configured port when
you're mapping ports. There's just an offset applied to the incoming
connection's destination port.
Willy