I have frontend listening on multiple ports and forwarding to backed on ports from 8001 to 8005
I have the following blocks for all 8001-5 ports? This looks redundant to me. Is there any easy of doing it without repeating the blocks for multiple ports?
Just, specify a port-range in the frontend, omit any ports in the backend (so the original destination port is used), and specify the port to do health checks on with the port directive (if you really need health checking, that is, because if you only have one server there is really no point in doing so).
I do have only one backend server but with multiple containers listening on respective 800x port. when I just have ācheckā without the port in the backend, it gives me āALERT: server app2 has neither service port nor check port nor tcp_check rule āconnectā with port iā error.
Is there any way to have a check on respective ports. Since its port points to different containers running on the backend, I would like to make sure that containers are running and responding on that port.
You could probably do something with set-dst-port based on arithmetic operation (like adding 20000 to the dst-port, if thatās the use case), but Iām not sure if the added complexity is worth it.