>> 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. Please forgive me to use terms not defined in the haproxy namespace. listen activemq-works bind :8162,:8163 option httpchk HEAD / server zd-activemq-s21 10.50.241.93:+1 check server zd-activemq-s22 10.50.241.94:+1 check "First port" is the first port of the ports defined in bind, here 8162. I observed with this configuration that a health check is made to 8162 and only to 8162. No offset is used. The connection to server uses incoming port + offset as you told me. And the question was which port for the health check should be used and in this case it is easy. Just use the ports defined in bind + offset. IMHO the health check with the incoming port without the offset is questionable. But this an egde case and special for our situation. But as I already said I misunderstood the concepts used in haproxy. And yes, there are of lot of decision problems for the health checks in the other cases which are the majority. Thanks for the discussion and the examples, I learned a lot about the usage of haproxy. Andreas -----Ursprüngliche Nachricht----- Von: Willy Tarreau [mailto:[email protected]] Gesendet: Mittwoch, 10. Februar 2016 08:37 An: Grüninger, Andreas (LGL Extern) Cc: Baptiste; [email protected] Betreff: Re: Offset in server definition not usable in 1.6.3 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

