Redis集群从slave到master的数据迁移
Migration of data from slave to master in Redis Cluster
我目前正在探索 Redis 集群。我在启用持久性的 3 台物理服务器(3 台主服务器和 3 台从服务器)上启动了 6 个实例。
我注意到,当我杀死其中一个主实例时,它的从实例会在一段时间后提升为主实例。但是,它 remains as master
即使我启动被杀死的实例。
由于Redis做的是异步复制,因此,我想到了master在刷新数据后立即被杀死的场景,即it wasn't able to replicate that data
。
Will this data get replicated to the new master(initially slave), once
the instance comes back up?
没有。如果master还没有复制数据到slave,数据就会丢失。当旧的master恢复时,它将成为基于some rules的某个其他节点的slave。然后老master会从新master复制数据
我目前正在探索 Redis 集群。我在启用持久性的 3 台物理服务器(3 台主服务器和 3 台从服务器)上启动了 6 个实例。
我注意到,当我杀死其中一个主实例时,它的从实例会在一段时间后提升为主实例。但是,它 remains as master
即使我启动被杀死的实例。
由于Redis做的是异步复制,因此,我想到了master在刷新数据后立即被杀死的场景,即it wasn't able to replicate that data
。
Will this data get replicated to the new master(initially slave), once the instance comes back up?
没有。如果master还没有复制数据到slave,数据就会丢失。当旧的master恢复时,它将成为基于some rules的某个其他节点的slave。然后老master会从新master复制数据