RedisShake
RedisShake copied to clipboard
How to know when is the sync-up done?
Even the sync-up is done it continuously go on, so what is the way to determine that the sync-up is done and make the code stop from that point of time? If we have three masters so we will have to syncup to each master individually or we provide all IPs at one place using commas as we used to do in older version?
- Send
info replication
to master node, and check themaster_repl_offset
and theoffset
inslaveXXX
. - Yes, currently need to do this. There may be improvements in future versions, possibly a helper script.
@suxb201 :
- Thanks for the input, don’t we have this already handled in the code to stop it, since i see it always running?
- What if we have different no of masters in the source and destination cluster, will it not be that some masters has to have more no of keys then?
@ayasha05
- Some users will have write traffic all the time, and they may want to use redis-shake to continuously synchronize data.
- The number of redis-shake you start should be the same as the number of nodes on the source cluster. Each redis-shake could send commands to all destination nodes, according to the key distribution rules of redis. https://redis.io/docs/reference/cluster-spec/#key-distribution-model
@suxb201 : Thanks for the quick response!!
- So I can stop the process once the rdb file sync-up is done?
- I just used redis-shake with 3 master-slave configuration and tried to put 1 master for slave and other regions 1 master for target, but I don’t see that all the destination masters has distributed data, the data was only copied in one of the master and two master were blank, though I also thought the approach you mentioned should work that it will equally make the slot according to no of master in destination but it was not like that, have i missed some configuration ?
@ayasha05
- Yes.
- Maybe you have the same number of source clusters as your destination clusters, so their slot distributions are the same, so one node's data will only be sent to one node.