Dear HAProxy Community!
Please, help me solve the problem.
There are 2 boxes running 2 identical services: service-A and service-B. With backend clients if the client connects to the service-A on the box1, then his connection to the service-B should also come to box1.
The difficulty is: if the service-A has failed on the box1, then no client should be able to connect to any services on the box1. So, if any of the services goes down, then the entire box should not be balanced. I can’t figure out how to do this.
backend clients
stick-table type ip size 10k expire 45m
listen service-A
bind 0.0.0.0:81
mode tcp
stick on src table clients
server box1 10.20.0.1:8081 check
server box2 10.20.0.2:8081 check
listen service-B
bind 0.0.0.0:82
mode tcp
stick on src table clients
server box1 10.20.0.1:8082 check
server box2 10.20.0.2:8082 check
Thanks in advance!
3 posts - 2 participants