Not putting any load on the Redis server that is returned from the haproxy

Hi,
It’s my first time using HAproxy and English is not my mother language
I hope you understand

my system’s version

  • HAproxy 2.1.7

  • Redis 5.0.7

  • dotnetcore 3.1

  • StackExchange.Redis.Extension.Core 5.5.0

  • I testing HA 1 + Redis 3 +sentinel 3+ dotnet core web server

test

  • R1 , R2 , R3
  • kill R2
  • R1 ‘s “instantaneous_ops_per_sec “ numbers go up
  • R3 ‘s “instantaneous_ops_per_sec” numbers go up
  • It’s ok …
  • and Put R2 back in
  • and I expect R2 ‘s instantaneous_ops_per_sec numbers go up
  • But it’s not work
  • is it normal ?
  • I think we need to put the load back on the recovered server.

red line = R1 = master
blue line = R2 = slave1
green line = R3 = slave2

For your information, the master-write/slave-read distribution is applied on the web server
If the write and read to the master without distribution, the load proceeds if there is no problem in recovery after fail-over.

maybe you could share an anonymized version of your configuration.

thank you for your reply. here is my configuration …There is nothing special.

global

log /dev/log local0
log /dev/log local1 notice

stats socket /var/run/haproxy.sock mode 777 level admin expose-fd listeners

daemon
maxconn 1000000

defaults REDIS
mode tcp
timeout connect 4s
timeout server 15s
timeout client 15s
timeout tunnel 24d

log global

frontend ft_redis_master
bind *:5000 name redis
default_backend bk_redis_master

backend bk_redis_master

option tcp-check

tcp-check connect

tcp-check send PING\r\n
tcp-check expect string +PONG

tcp-check send info\ replication\r\n

tcp-check expect string role:master

tcp-check expect string repl_backlog_active:1
tcp-check send QUIT\r\n
tcp-check expect string +OK

server R1 10.10.10.11:6379 check inter 1s
server R2 10.10.10.12:6379 check inter 1s
server R3 10.10.10.13:6379 check inter 1s

frontend ft_redis_slave
bind *:5001 name redis
default_backend bk_redis_slave

backend bk_redis_slave

balance roundrobin
option tcp-check
tcp-check connect

tcp-check send PING\r\n
tcp-check expect string +PONG

tcp-check send info\ replication\r\n
tcp-check expect string role:slave
tcp-check send QUIT\r\n
tcp-check expect string +OK

server R1 10.10.10.11:6379 check inter 1s
server R2 10.10.10.12:6379 check inter 1s
server R3 10.10.10.13:6379 check inter 1s

listen stats
bind 0.0.0.0:9001
mode http
balance
timeout client 5000
timeout connect 4000
timeout server 30000

stats uri /stats
stats realm HAProxy\ Statistics
stats auth admin:password    
stats admin if TRUE