Data Transmission Service (DTS) synchronizes data in real time from a self-managed Redis database on an Elastic Compute Service (ECS) instance to a Tair (Redis-Compatible) instance. DTS uses PSYNC/SYNC replication to first complete a full data copy, then continuously applies incremental changes — keeping the destination in sync without stopping your source database.
After you configure a data synchronization task, do not change the architecture of the source or destination database. Doing so causes the task to fail.
Prerequisites
Before you begin, ensure that you have:
A self-managed Redis instance running on an ECS instance
A Tair (Redis-Compatible) instance using direct connection mode. For setup instructions, see Create a Tair instance
DTS supports only Tair (Redis-Compatible) instances in direct connection mode. For supported versions, see Synchronization solutions.
Storage space on the destination instance that exceeds the total data size of the source database
For cluster-architecture sources: all cluster nodes can run the
PSYNCcommand and share the same connection passwordSource account with
PSYNCandSYNCpermissionsA
repl-timeoutvalue of at least 600 seconds on the source instance. Run the following command to set it:config set repl-timeout 600The default is 60 seconds. If the source database contains a large amount of data, you can increase the value of the repl-timeout parameter as needed.
Billing
| Synchronization type | Fee |
|---|---|
| Full data synchronization | Free |
| Incremental data synchronization | Charged. See Billing overview |
Supported synchronization topologies
One-way one-to-one synchronization
One-way one-to-many synchronization
One-way cascade synchronization
For details, see Synchronization topologies.
Supported operations
The following Redis operations can be synchronized:
APPENDBITOP,BLPOP,BRPOP,BRPOPLPUSHDECR,DECRBY,DELEVAL,EVALSHA,EXEC,EXPIRE,EXPIREATGEOADD,GETSETHDEL,HINCRBY,HINCRBYFLOAT,HMSET,HSET,HSETNXINCR,INCRBY,INCRBYFLOATLINSERT,LPOP,LPUSH,LPUSHX,LREM,LSET,LTRIMMOVE,MSET,MSETNX,MULTIPERSIST,PEXPIRE,PEXPIREAT,PFADD,PFMERGE,PSETEXRENAME,RENAMENX,RESTORE,RPOP,RPOPLPUSH,RPUSH,RPUSHXSADD,SDIFFSTORE,SELECT,SET,SETBIT,SETEX,SETNX,SETRANGE,SINTERSTORE,SMOVE,SPOP,SREM,SUNIONSTOREZADD,ZINCRBY,ZINTERSTORE,ZREM,ZREMRANGEBYLEX,ZUNIONSTORE,ZREMRANGEBYRANK,ZREMRANGEBYSCORESWAPDB,UNLINK(source engine version 4.0 only)XADD,XCLAIM,XDEL,XAUTOCLAIM,XGROUP CREATECONSUMER,XTRIM
PUBLISH operations cannot be synchronized.IfEVALorEVALSHAcalls Lua scripts, DTS cannot confirm whether those scripts were executed on the destination during incremental synchronization — the destination does not return explicit results for Lua scripts.
WhenSYNCorPSYNCtransfersLISTdata, DTS does not clear existing data in the destination, which can cause duplicate records.
Restrictions
Source database restrictions
| Restriction | Details |
|---|---|
FLUSHDB / FLUSHALL commands | Do not run these commands during synchronization — they cause data inconsistency between source and destination. |
bind parameter in redis.conf | If configured, set it to the private IP address of the ECS instance so DTS can connect. |
| DTS heartbeat key | DTS inserts a key prefixed with DTS_REDIS_TIMESTAMP_HEARTBEAT into the source database to track update timestamps. In cluster mode, this key is inserted into each shard. The key is filtered during synchronization and expires when the task ends. |
| Latency reporting | Latency may be inaccurate if the source database is read-only or if the DTS account lacks write (SETEX) permission. |
repl-backlog-size | Increase this value in the source redis.conf to improve synchronization stability. |
| Key expiration | Keys with expiration policies may not expire immediately — the destination may have fewer keys than the source. Run INFO on the destination to check the current key count. Keys without expiration policies, or those that have not expired, are synchronized identically. |
| Basic Edition to cluster (CROSSSLOT error) | A Redis cluster allows commands to operate on only a single slot. Multi-key commands across slots fail with CROSSSLOT Keys in request don't hash to the same slot. Run only single-key commands during synchronization. |
Other restrictions
| Restriction | Details |
|---|---|
| Version compatibility | Synchronize from an earlier Redis version to a later version. Synchronizing from a later to an earlier version may cause compatibility issues. |
| Source scaling during synchronization | If the source instance is scaled (shards added or removed) or its memory is scaled up, reconfigure the task. Clear all data in the destination before reconfiguring to maintain consistency. |
| Endpoint changes | If the source or destination is a self-managed instance and its endpoint changes — for example, due to migration or failover — the task may retry, experience latency, or fail. Check the task status and reconfigure if needed. |
| Destination failover | If a failover occurs on the destination, data might be written only to memory without being persisted to the secondary database, which can cause data loss. |
| Full synchronization load | DTS uses resources from both source and destination during full synchronization, increasing server load. Run synchronization during off-peak hours for large datasets. |
FLUSHDB / FLUSHALL (cluster-to-cluster) | Do not run these commands when synchronizing between Redis clusters — they cause data inconsistency. |
| Destination memory eviction | The default eviction policy (maxmemory-policy) of Tair (Redis-Compatible) is volatile-lru. If the destination runs out of memory, eviction causes data inconsistency without stopping the task. Set the policy to noeviction to prevent silent data loss: if the destination runs out of memory, writes fail and the task stops, but no data is lost through eviction. See Redis data eviction policies. |
| External writes to destination | Do not write data to the destination from any source other than DTS during synchronization — this causes data inconsistency. |
| Cluster destination OOM | If a shard in a cluster-edition destination reaches its memory limit, or if the destination has insufficient storage space, the task fails with an out of memory (OOM) error. |
| Transparent Data Encryption (TDE) | If TDE is enabled on the destination, DTS cannot synchronize data to it. |
| Full re-synchronization triggers | A full re-synchronization may occur in these situations, which can cause data inconsistency: a transient connection failure prevents breakpoint resumption; a failover occurs on the source or destination; the source or destination endpoint changes; or the synchronization objects are modified. |
| TLS encryption | If Transport Layer Security (TLS) encryption is enabled on a Tair (Redis OSS-Compatible) instance, use an SSL-encrypted connection. TLSv1.3 is not supported. Instances with SSL enabled cannot use the Alibaba Cloud Instance access method. |
| Full + incremental task restart | If the synchronization instance includes both full and incremental tasks, restarting may cause both tasks to run again from the beginning. |
| DTS instance recovery | If the DTS instance fails, DTS attempts recovery within 8 hours. During recovery, the instance may be restarted or have its parameters adjusted. Only DTS instance parameters are modified — database parameters are not changed. For parameters that may be modified, see Modify instance parameters. |
Configure a synchronization task
The configuration process consists of five steps: open the synchronization page, configure source and destination databases, configure synchronization objects, run the precheck, and purchase the instance.
Step 1: Open the data synchronization page
Use one of the following methods to reach the Data Synchronization page.
DTS console
Log in to the DTS console.DTS console
In the left-side navigation pane, click Data Synchronization.
In the upper-left corner, select the region where the synchronization task resides.
DMS console
Steps may vary based on the DMS console mode and layout. See Simple mode and Customize the layout and style of the DMS console.
Log in to the DMS console.DMS console
In the top navigation bar, hover over Data + AI and choose DTS (DTS) > Data Synchronization.
From the drop-down list to the right of Data Synchronization Tasks, select the region where the synchronization instance resides.
Step 2: Configure source and destination databases
Click Create Task.
On the task configuration page, configure the parameters in the following tables.
General settings
| Parameter | Description |
|---|---|
| Task Name | DTS auto-generates a task name. Specify a descriptive name to identify the task. The name does not need to be unique. |
Source database
| Parameter | Description |
|---|---|
| Select Existing Connection | If the source instance is registered with DTS, select it from the drop-down list — DTS auto-fills the remaining parameters. Otherwise, configure the parameters below manually. In the DMS console, select the instance from the Select a DMS database instance list. |
| Database Type | Select Tair/Redis. |
| Access Method | Select Self-managed Database On ECS. |
| Instance Region | Select the region of the ECS instance hosting the source Redis database. |
| Cross-Account (Alibaba Cloud) | Select No (same Alibaba Cloud account). |
| ECS Instance ID | Select the ECS instance ID where the source Redis database runs. For cluster-architecture sources, select the ECS instance of a primary node, then manually add the DTS server IP CIDR blocks of the corresponding region to the security rules of each other ECS instance. See Create a security group, Associate a security group with an instance (primary ENI), and Add the CIDR blocks of DTS servers to a whitelist. |
| Instance Mode | Select Basic Edition or Cluster based on the source Redis architecture. |
| Port | Enter the service port of the source Redis database. Default: 6379. For cluster sources, enter the port of a primary node. |
| Authentication Method | Select the authentication method. This example uses Password Login. Account + Password Login requires Redis 6.0 or later. For Secret-free login, make sure password-free access is enabled on the database. See Enable password-free access. |
| Database Password | Enter the password for the source Redis database. This field is optional — leave it blank if no password is set. The format is <user>:<password>, for example, admin:Rp829dlwa. |
| Encryption | Select Non-encrypted or SSL-encrypted. If SSL-encrypted is selected for a non-Alibaba Cloud instance, upload a CA Certificate and enter a CA Key. |
Destination database
| Parameter | Description |
|---|---|
| Select Existing Connection | If the destination instance is registered with DTS, select it from the drop-down list — DTS auto-fills the remaining parameters. Otherwise, configure the parameters below manually. In the DMS console, select the instance from the Select a DMS database instance list. |
| Database Type | Select Tair/Redis. |
| Access Method | Select Cloud Instance. |
| Instance Region | Select the region of the destination Tair (Redis-Compatible) instance. |
| Replicate Data Across Alibaba Cloud Accounts | Select No (same Alibaba Cloud account). |
| Instance ID | Select the ID of the destination Tair (Redis-Compatible) instance. |
| Authentication Method | Select the authentication method. This example uses Password Login. Account + Password Login requires Redis 6.0 or later. |
| Database Password | Enter the password for the destination Tair (Redis-Compatible) instance. The format is <user>:<password>, for example, admin:Rp829dlwa. |
| Encryption | Select Non-encrypted or SSL-encrypted based on your business requirements. If Access Method is not set to Alibaba Cloud Instance and you select SSL-encrypted, you must upload a CA Certificate and enter a CA Key. |
Click Test Connectivity and Proceed.
- DTS server CIDR blocks must be added to the security settings of both source and destination databases. See Add DTS server IP addresses to a whitelist. - If the source or destination is a self-managed database (not Alibaba Cloud Instance), click Test Connectivity in the CIDR Blocks of DTS Servers dialog box.
Step 3: Configure synchronization objects
In the Configure Objects step, set the following parameters.
| Parameter | Description |
|---|---|
| Synchronization Types | Full Data Synchronization + Incremental Data Synchronization is selected by default. |
| Processing Mode of Conflicting Tables | Precheck and Report Errors: checks whether data exists in the destination. If data exists, the precheck fails and the task cannot start. Ignore Errors and Proceed: skips the destination existence check. Warning This option may cause data loss — source data overwrites matching keys in the destination. |
| Source Objects | Select one or more databases from Source Objects and click |
| Selected Objects | To map a database to a different DB number (DB 0 to DB 255) or filter by key prefix, right-click the database in Selected Objects and configure settings in the Edit Schema dialog box. See Map object names and Specify filter conditions. Multiple object name mappings cannot be configured at the same time. |
Click Next: Advanced Settings and configure the following parameters.
| Parameter | Description |
|---|---|
| Dedicated Cluster for Task Scheduling | By default, DTS schedules tasks to the shared cluster. To improve stability, purchase a dedicated cluster. See What is a DTS dedicated cluster. |
| Retry Time for Failed Connections | How long DTS retries after a connection failure. Valid values: 10–1440 minutes. Default: 720. Set to more than 30 minutes. If DTS reconnects within this period, the task resumes; otherwise, it fails. If multiple tasks share the same source or destination, the shortest retry period applies. DTS charges for the instance during retry. |
| Retry Time for Other Issues | How long DTS retries after DDL or DML failures. Valid values: 1–1440 minutes. Default: 10. Set to more than 10 minutes. This value must be less than Retry Time for Failed Connections. |
| Enable Throttling for Full Data Synchronization | Throttle full synchronization to reduce load on source and destination. Configure Queries per second (QPS) to the source database, RPS of Full Data Migration, and Data migration speed for full migration (MB/s). Available only when Full Data Synchronization is selected. |
| Enable Throttling for Incremental Data Synchronization | Throttle incremental synchronization. Configure RPS of Incremental Data Synchronization and Data synchronization speed for incremental synchronization (MB/s). |
| Environment Tag | Tag the instance with an environment label. Optional. |
| Extend Expiration Time of Destination Database Key | Set an extended expiration time for synchronized keys. Use this to maintain data consistency when the source uses expiration commands. In distributed lock scenarios, this may delay lock release. Affected commands: EXPIRE, PEXPIRE, EXPIREAT, PEXPIREAT. |
| Use Slave Node | Available when the source Instance Mode is Cluster. Choose to read from primary or replica nodes. Default: No (reads from the primary node). |
| Configure ETL | Enable extract, transform, and load (ETL) to apply data transformations during synchronization. Yes: configure ETL using the code editor. See Configure ETL in a data migration or synchronization task. No: skip ETL. See What is ETL? |
Click Next Step: Data Verification to configure data verification. See Configure a data verification task.
Step 4: Run the precheck
To view API parameters for this task configuration, hover over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters.
Click Next: Save Task Settings and Precheck.
DTS runs a precheck before the task starts. The task can only start after the precheck passes.
If the precheck fails, click View Details next to the failed item to see the cause. Fix the issue and run the precheck again.
If an alert is triggered:
For alerts that cannot be ignored, click View Details, fix the issue, and run the precheck again.
For alerts that can be ignored, click Confirm Alert Details, then click Ignore > OK > Precheck Again. Ignoring alerts may cause data inconsistency.
Step 5: Purchase and start the instance
Wait until the Success Rate reaches 100%, then click Next: Purchase Instance.
On the purchase page, configure the following parameters.
| Parameter | Description |
|---|---|
| Billing Method | Subscription: pay upfront for a fixed period — more cost-effective for long-term use. Pay-as-you-go: billed hourly — suitable for short-term use. Release the instance when no longer needed to stop charges. |
| Resource Group Settings | The resource group for the synchronization instance. Default: default resource group. See What is Resource Management? |
| Instance Class | Select an instance class based on the required synchronization speed. See Instance classes of data synchronization instances. |
| Subscription Duration | Available for Subscription billing only. Options: 1–9 months, or 1, 2, 3, or 5 years. |
Read and accept Data Transmission Service (Pay-as-you-go) Service Terms.
Click Purchase And Start, then click OK.
The task appears on the data synchronization page. If the task includes both Full Data Synchronization and Incremental Data Synchronization, it is displayed as a single Incremental Data Synchronization task in the task list.
What's next
Monitor task status and latency on the data synchronization page.
DTS also supports one-way synchronization between Tair (Redis-Compatible) instances. The configuration steps are the same as described in this topic.
For synchronization topology options, see Synchronization topologies.