I have setup a percentage based routing configuration by splitting two different clusters into two different backends through some redirection back through front ends as seen below. (note: this is my first time configuring routing to facilitate a slow cutover to a new cluster, if there is a ‘smarter’ way I am open to hearing about that too.)
global
log 127.0.0.1 local2
pidfile /var/run/haproxy.pid
maxconn 30000
user haproxy
group haproxy
daemon
external-check
defaults
mode tcp
retries 3
timeout queue 1m
timeout connect 1m
timeout client 1m
timeout server 1m
timeout check 10s
grace 10000
maxconn 30000
balance roundrobin
log global
frontend frontend_a
bind *:5000
default_backend backend_a
backend backend_a
balance roundrobin
option tcp-check
server cluster1 localhost:5001 check inter 10s weight 50
server cluster2 localhost:5002 check inter 10s weight 50
frontend_b
bind localhost:5001
default_backend backend_b
frontend_c
bind localhost:5002
default_backend backend_c
backend backend_b
balance roundrobin
option tcp-check
server backend_b_server1 10.20.0.1:5003 check inter 10s
server backend_b_server2 10.20.0.2:5003 check inter 10s
backend backend_c
balance roundrobin
option tcp-check
server backend_c_server1 10.20.0.3:5004 check inter 10s
server backend_c_server2 10.20.0.4:5004 check inter 10s
I am seeing the logs properly identify frontend backend/server name upon entry into the system
frontend_a backend_a/cluster1
but when going through the next layer it loses the server name, for some reason I get
frontend_b backend_b/<NOSRV>
The balancing works as expected and the requests complete successfully. What is causing the NOSRV? It does not seem to be the typical issue around no backends or redirecting or things discussed in other NOSRV posts.
haproxy -v
HA-Proxy version 2.1.2 2019/12/21 - https://haproxy.org/
Status: stable branch - will stop receiving fixes around Q1 2021.
Known bugs: http://www.haproxy.org/bugs/bugs-2.1.2.html
1 post - 1 participant