首页 > 数据库 >Redis - Replication

Redis - Replication

时间:2022-08-19 15:23:00浏览次数:81  
标签:stream Redis dataset will Replication replica master

At the base of Redis replication there is a leader follower (master-replica) replication that is simple to use and configure. It allows replica Redis instances to be exact copies of master instances. The replica will automatically reconnect to the master every time the link breaks, and will attempt to be an exact copy of it regardless of what happens to the master.

1、When a master and a replica instances are well-connected, the master keeps the replica updated by sending a stream of commands to the replica to replicate the effects on the dataset happening in the master side due to: client writes, keys expired or evicted, any other action changing the master dataset.

2、When the link between the master and the replica breaks, for network issues or because a timeout is sensed in the master or the replica, the replica reconnects and attempts to proceed with a partial resynchronization: it means that it will try to just obtain the part of the stream of commands it missed during the disconnection.

3、When a partial resynchronization is not possible, the replica will ask for a full resynchronization. This will involve a more complex process in which the master needs to create a snapshot of all its data, send it to the replica, and then continue sending the stream of commands as the dataset changes.

标签:stream,Redis,dataset,will,Replication,replica,master
From: https://www.cnblogs.com/feiqiangsheng/p/16602086.html

相关文章

  • Redis - Evictions
    Thisbehavioriswellknowninthedevelopercommunity,sinceitisthedefaultbehaviorforthepopularmemcachedsystem.MaxmemoryconfigurationdirectiveTh......
  • 关于SpringBoot整合redis使用Lettuce客户端超时问题
    问题起因使用到Lettuce连接redis,一段时间后不操作,再去操作redis,会报连接超时错误,在其重连后又可使用。原因是:Lettuce自适应拓扑刷新(Adaptiveupdates)与定时拓扑刷新(Peri......
  • Docker安装Redis
    1.下载Redis镜像sudodockerpullredis 2.启动Redissudomkdir-p/mydata/redis/confsudotouch/mydata/redis/conf/redis.confsudodockerrun-p63......
  • Redis 内存占满
    1.案例redis内存占用满了错误提示:OOMcommandnotallowedwhenusedmemory>‘maxmemory’2.排查步骤确定哪台redis服务器使用set命令随便设置值,查看是否成......
  • docker compose搭建redis7.0.4高可用一主二从三哨兵集群并整合SpringBoot【图文完整版
    一、前言redis在我们企业级开发中是很常见的,但是单个redis不能保证我们的稳定使用,所以我们要建立一个集群。redis有两种高可用的方案:HighavailabilitywithRedisSen......
  • 深入理解Redis 数据结构—字典
    字典,又称为符号表、关联数组或映射,是一种用于保存键值对的抽象数据结构。在字典中,一个键可以和一个值进行关联,这些关联的键和值称为键值对。键值对中键是唯一的,我们可以......
  • Redis学习(2)set和zset
    set集合底层就是一个hash表,只不过保存的值是null。添加删除saddkeyelementelement...用element等创建一个setsmemberskey显示key中成员sismemberskeyelemen......
  • 【Azure Redis 缓存】Redisson 连接 Azure Redis出现间歇性 java.net.UnknownHostExce
    问题描述在Java项目中,使用Redisson作为连接Redis的客户端,间歇性的出现了DNSMonitorthrowable错误。DNSMonitorthrowable="java.net.UnknownHostException:failedto......
  • redis-golang strings 操作
    本文来自于  github.com/go-redis/redis/v9的自带的测试代码commands_test1、Append(ctxcontext.Context,key,valuestring)//如果不存在key,就将keyval......
  • Redis - Persistence
    • RDB(RedisDatabase):TheRDBpersistenceperformspoint-in-timesnapshotsofyourdatasetatspecifiedintervals.• AOF(AppendOnlyFile):TheAOFpersis......