跳到主要内容

Redis

选择对端数据库:

数据链路

基本功能

功能说明
全量迁移、增量同步一体化

通过执行 PSYNC 指令同步数据, 可选历史数据初始化

回溯位点

支持通过修改位点,重新初始化历史数据

部署形态支持

支持 单节点Sentinel分片集群 Redis

指令支持

当前支持以下指令(不断增加丰富):

  • SET, SETNX, SETEX, APPEND, GETSET, HSET, HSETNX, MSET, HMSET
  • DEL, HDEL, UnLink
  • INCR, INCRBY, HINCRBY, DECR, DECRBY
  • LPUSH, RPUSH, LSET, LINSERT, LREM, LPOP, RPOP, LTRIM
  • SADD, ZADD, ZREM, ZREMRANGEBYSCORE, SREM, ZINCRBY, ZREMRANGEBYRANK, ZREMRANGEBYLEX
  • EXPIRE, PExpire, RENAME, Eval, PUBLISH

高级功能

功能说明
Cache Expiration Time

Allow setting the cache expiration time (in seconds) for data after it is written to Redis.

Redis 双向同步

支持全量迁移、增量同步双向防循环,文档:Redis 双向数据同步

Redis 双向同步指令支持

当前双向同步支持以下指令(不断增加丰富):

  • SET, SETNX, SETEX, APPEND, GETSET, HSET, HSETNX, MSET, HMSET
  • DEL, HDEL, UnLink
  • INCR, INCRBY, HINCRBY
  • LPUSH, RPUSH, LSET, LINSERT, LREM, LPOP, RPOP, LTRIM
  • SADD, ZADD, ZREM, ZREMRANGEBYSCORE, SREM, ZREMRANGEBYRANK, ZREMRANGEBYLEX
  • EXPIRE, PExpire, Eval, PUBLISH

限制和注意点

限制项说明
Failover Compatibility

Redis 3.x, due to its use of an earlier version of PSYNC, has poor failover compatibility and carries a risk of data loss.

Replication Backlog Configuration

The default Redis replication parameter repl-backlog-size is too small. If there is significant data synchronization latency, it may trigger a FULL SYNC for full initialization. It is recommended to increase the value of this parameter.

使用示例

标题详情
Redis 双向数据同步

文档:Redis 双向数据同步


源端数据源

前置条件

条件说明
Command Preparation

The PSYNC command can be executed (may not be supported by managed cloud services).

Port Preparation

Allow the migration and sync node (Worker) to connect to the Redis port and Sentinel port (if available).

任务参数

参数名称说明
dbHeartbeatIntervalSec

Interval for sending the PING command.

deCycle

Enable event filtering in bidirectional data synchronization, which filters out the specific events to prevent circular data replication in the Incremental stage.

deCycleMode

Bidirectional data synchronization event filter modes: GET_KEY represents query marking mode, and DEL_KEY represents delete marking mode.

enableDbMapping

Enable Redis DB mapping. Make sure that the number of DBs in the source and target instances are equal.

deCycleEventExpireSec

Expiration time for the specific events to prevent circular data replication written to the target instance; <0 means the events won‘t expired.

extractorQueueSize

Queue size for temporarily stored Redis events.

inputStreamBufferSize

Buffer size of byte streams for receiving Redis response.

connAndSoTimeoutMs

TCP connection parameter SO_TIMEOUT.

receiveBufferSize

TCP connection parameter SO_RCVBUF.

sendBufferSize

TCP connection parameter SO_SNDBUF.

isSentinel

true represents Redis Sentinel Cluster, while false represents Single Node or Sharded Cluster.

sentinelUser

Username for connecting to Sentinel.

sentinelPassword

Password for connecting to Sentinel.

sentinelMasterName

Master Name specified in the Redis Sentinel configuration.

Tips: 通用参数配置请参考 通用参数及功能


目标端数据源

前置条件

条件说明
Port Preparation

Allow the migration and sync node (Worker) to connect to the Redis port and Sentinel port (if available).

任务参数

参数名称说明
isSentinel

true represents Redis Sentinel Cluster, while false represents Single Node or Sharded Cluster.

sentinelUser

Username for connecting to Sentinel.

sentinelPassword

Password for connecting to Sentinel.

sentinelMasterName

Master Name specified in the Redis Sentinel configuration.

secondsToExpire

Use the set command to specify the expiration time of data written to the Target; -1 means no limit.

Tips: 通用参数配置请参考 通用参数及功能

数据链路

基本功能

高级功能

限制和注意点

使用示例

链路FAQ

源端数据源

前置条件

任务参数

目标端数据源

前置条件

任务参数