how to test redis cluster -




i have redis cluster 3 masters. not interested in data persistence since caching solution. running v3.2 on windows. when stop 1 of servers manually see if can still access db, 'clusterdown cluster down error'. , that, have connect 1 of instances still working. don't see how solution high availability. hope missing something. ideas why can't access cluster when 1 of nodes down? thank you.

cluster create command:ruby.exe redis-trib.rb create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002

as said you're using 3 master nodes within redis cluster, visible if 1 of node down you'll clusterdown errors.

to avoid these type of errors , high availability, better have slaves attached of master nodes(as shown in official redis cluster tutorial here).

there's reason have slave attached master higher availability. can read these lines mentioned in above redis cluster tutorial link.

there 16384 hash slots in redis cluster, , compute hash slot of given key, take crc16 of key modulo 16384.

every node in redis cluster responsible subset of hash slots, so example have cluster 3 nodes, where:

1) node contains hash slots 0 5500.

2) node b contains hash slots 5501 11000.

3) node c contains hash slots 11001 16383.

so whenever used set key in redis cluster, calculates hash slot value key , save key accordingly in 1 of node. reason mandatory have of nodes(at least master or 1 slave) active in redis cluster.

rest if you'll attach @ least 1 slave every master node redis cluster, you'll better redis cluster availability. after attaching slaves master node, can test setup higher availability closing of master node manually.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -