Hello,
I have a 3 server redis signalR backend that 1 of them is master and 2 slaves.
They return a “role:master” or “role:slave” string depend on their role. The role is fixed so the master and the slaves should always be on the same machines (even they can rotate automatically in case of failure).
The problem is that I don’t know and can’t find any clue on how to make the string check different by server in order to display “all healthy” in status page.
Right now I have a configuration like this:
option tcp-smart-accept
option tcp-smart-connect
option tcpka
option tcplog
option tcp-check
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 send QUIT\r\n
tcp-check expect string +OK
server srv1 server1.internal:6380 check port 6380 fall 3 rise 3
server srv2 server2.internal:6380 check port 6380 fall 3 rise 3
server srv3 server3.internal:6380 check port 6380 fall 3 rise 3
The srv1 is the master and srv2 and srv3 are the slaves.
Is it possible to check the string “role:master” only on srv1 and the string “role:slave” on srv2 and srv3?
Like this the health check only pass in the srv1 because is the only that returns “role:master”, the others “are down” which isn’t really true.
Thank you,
Pedro