[BUG] Multi-Master Lost one Replication Node, Will Pending Client Connect Keydb Server
Describe the bug
Close one of Master Node (Maybe Network Issue or Service Shutdown)
for the Replication wait PING/PONG timeout (like repl-ping-replica-period 10)
the others Node will show Unable to connect to MASTER: Resource temporarily unavailable
for the issue, keydb server will check replica node, and the client will pending on connect server (about pending 10s)
after reloading check replica node success, keydb can connect and access of standard performance
but a few sewcond (about 5s), keydb server will reload check replica node again.
To reproduce
Build on kubernetes cluster, keydb with 3 replicas master server
use the helm chart (0.32.1) to created, keydb image version is 6.2.1
Create the Multi-Master Replication (I also enable RDB)
Replication Master connect with 3 Servers (include self)
- use
redis-cliwrite to keydb with k8s service, within the while loop bash.
while true; do sleep 0.1 && redis-cli -h <your-ip> --user default --pass <passwd> --no-auth-warning set $(date +"%Y%m%d_%H%M%S.%3N") $(date +"%Y%m%d_%H%M%S.%3N") && echo $(date +"%Y%m%d_%T.%3N"); done
- scale the k8s statefulset replica: 3 -> 2 (keydb server will close one)
- log another keydb pod, will got
Unable to connect to MASTER: Resource temporarily unavailable - pod will got keydb interval loading check the losed replication node, and pending before
Connecting to MASTER acm-keydb-2.acm-keydb-headless:6379, - after the
Connecting to MASTER acm-keydb-2.acm-keydb-headless:6379throw, the client can access keydb a few second. - the
redis-cliwrite bash will pending for connection, and wait about 10s, it will can write, and looping the write / pending state.
Expected behavior
- I thing the keydb can lose some replica node, and also can working scable, or
- So, I want to know the all of replica node needed alive ?, or keydb have minmium alive node for replication setting (perhaps i not setting down), can tuning the minimium count of node.
- Face on this issue, I got the parameter
min-replicas-to-write 3inkeydb.conf, but it seems like not working to slove this issue
Additional information
Kubernetes: v1.21.0 Keydb: 6.2.2 redis-cli: 6.2.6