Redis 到 Redis
| 功能 | 说明 |
|---|---|
Full Data Migration and Incremental Data Sync | Synchronize data by executing the PSYNC command, with optional historical data initialization. |
Position Resetting | Initialize historical data again by modifying the position. |
Supported Deployment | Support single node, Sentinel, and Redis sharded cluster. |
Supported Commands | Currently support the following commands (continuously expanding):
|
高级功能
| 功能 | 说明 |
|---|---|
缓存失效时间 | 支持设置数据到 Redis 后缓存失效时间(单位:秒) |
Bidirectional Redis Synchronization | Support full data migration and incremental data synchronization in which the circular data replication is prevented. See Redis Bidirectional Data Synchronization. |
Supported Commands for Redis Bidirectional Synchronization | Currently, the following commands are supported in bidirectional synchronization (continuously expanding):
|
限制和注意点
| 限制项 | 说明 |
|---|---|
主备切换兼容性 | Redis 3.x 因使用早期版本的 PSYNC , 主备切换适配较差,存在丢数据风险 |
复制 backlog 设置 | Redis 默认复制参数 repl-backlog-size 过小, 如数据同步延迟过大,可能触发 FULL SYNC 全量初始化。需调大此参数 |
任务参数
| 参数名称 | 说明 |
|---|---|
dbHeartbeatIntervalSec | 发送 PING 指令的间隔时间 |
deCycle | 双向同步过滤开关,过滤带防循环事件的增量事件 |
deCycleMode | 双向同步过滤事件模式:GET_KEY 代表 查询 标记模式,DEL_KEY 代表 删除 标记模式,TX_SIGN 代表 事务 标记模式 |
enableDbMapping | Redis 启用 DB 映射,需要保证源端和目标端实例 DB 数量相等 |
deCycleEventExpireSec | 防循环事件写入对端后的过期时间, <0 则不过期 |
extractorQueueSize | 暂存的 Redis 事件的队列大小 |
inputStreamBufferSize | 接收 Redis 响应的字节流 buffer 大小 |
connAndSoTimeoutMs | TCP 链接参数 SO_TIMEOUT |
receiveBufferSize | TCP 链接参数 SO_RCVBUF |
sendBufferSize | TCP 链接参数 SO_SNDBUF |
isSentinel | true 代表 Redis Sentinel 集群,false 则代表 单机或分片集群 |
sentinelUser | 连接 Sentinel 的用户名 |
sentinelPassword | 连接 Sentinel 的密码 |
sentinelMasterName | Redis Sentinel 配置中指定的 Master Name |
enableWriteDeReplay | Redis 增量非幂等指令时,是否开启防重放逻辑 |
Tips: 通用参数配置请参考 通用参数及功能
任务参数
| 参数名称 | 说明 |
|---|---|
isSentinel | true 代表 Redis Sentinel 集群,false 则代表 单机或分片集群 |
sentinelUser | 连接 Sentinel 的用户名 |
sentinelPassword | 连接 Sentinel 的密码 |
sentinelMasterName | Redis Sentinel 配置中指定的 Master Name |
secondsToExpire | 通过 set 指令写入对端数据的 过期时间,-1 则不做限制 |
Tips: 通用参数配置请参考 通用参数及功能