Best Practice: Migrate AWS ElastiCache to Alibaba Cloud Tair via RIOT
1. Prepare for Resource Migration
1.1. Source
AWS ElastiCache cache.r6g.xlarge. It has three data shards and is compatible with Redis 6.2.

AWS EC2 t2.medium CentOS 7 (It is in the same VPC as AWS ElastiCache because ElastiCache does not support public network connection.)

1.2. Target
Alibaba Cloud Tair tair.rdb.with.proxy.24g. It has three data shards and is compatible with Redis 6.0. (Public network address is enabled, and the whitelist is set to EC2 public network IP address.)

2. Configure the Source Database Environment
2.1 Change the value of the AWS ElastiCache parameter and notify-keyspace-events to KEA for the source instance.
Open the parameter group on the left side of the AWS ElastiCache console and create a new template based on the current version, such as Redis 6.x.


2.2 Change the value of the notify-keyspace-events to KEA and cluster-enabled to yes.


2.3 Apply New Parameter Template on Elasticache Instance



3. Deploy the RIOT Tool on the EC2 Instance
sudo yum install java-1.8.0-openjdk -y
wget https://github.com/redis-developer/riot/releases/download/v3.1.5/riot-3.1.5.zip
unzip riot-3.1.5.zip
4. Install the Redis Client on the EC2 Instance
Deploy the Redis client on the EC2 instance and connect to the ElastiCache instance to create test data.
Note: If there is already an ElastiCache instance with data, you do not need to recreate the test data. You can install the Redis client on the EC2 instance.
sudo yum install gcc jemalloc-devel openssl-devel tcltcl-devel -y
sudo wget http://download.redis.io/redis-stable.tar.gz
sudo tar xvzf redis-stable.tar.gz
cd redis-stable
sudo make BUILD_TLS=yes
src/redis-cli -c -h clustercfg.test-20230904.vsntkk.apne1.cache.amazonaws.com --tls -a xxxxxxxxxxxx -p 6379

5. Start the Migration
5.1. Start the RIOT Tool on the EC2 Instance
Log on to the EC2 host, use the source and target parameters, and start the RIOT program to synchronize full and incremental data.
cd /home/centos/riot-3.1.5/bin
./riot -h clustercfg.test-20230904.vsntkk.apne1.cache.amazonaws.com --tls -a xxxxxxxxxxx -c -p 6379 replicate -h r-gs5u6x8xuwywt0q8qnpd.redis.singapore.rds.aliyuncs.com -p 6379 --user=poc --pass=xxxxxxxx -c --mode live --progress log

5.2. Log on to the Target Instance Tair to Verify the Data
Access the Tair console and log on to the database through DMS to query data and check whether full data is migrated properly:





5.3. Write Incremental Data and Verify It
Insert incremental data into the source instance Elasticache and verify the incremental data in the target instance Tair:





6. Summary
Using RIOT makes it easy to quickly migrate data from AWS ElastiCache to cloud-native in-memory databases, such as Tair and ApsaraDB for Redis. Compared with other methods (such as redis-shake), the tool supports full migration along with enhanced replication without downtime during migration, which is a very good tool for improving efficiency.
7. About RIOT
RIOT (or Redis Input/Output Tools) is an open-source online migration tool built by Julien Ruaux, a Solution Architect at Redis. It is a migration tool that allows seamless live replication between two Redis databases. It implements client-side replication using a producer/consumer approach.
RIOT is a command-line utility designed to help you get data in and out of Redis. It supports many different sources and targets, including files (CSV, JSON, XML), data generators (Redis data structures and Faker), relational databases, and Redis (snapshot and live replication). RIOT can be installed in different ways depending on your environment and preference.
In terms of safety, RIOT Redis performs a verification step to compare values and TTLs between source and destination databases once the replication is complete. However, as with any migration process, it is always a good idea to back up your data before proceeding.
8. About Tair
Tair is a cloud-native in-memory database service developed by Alibaba Cloud. It provides full compatibility with open-source Redis and offers a variety of data modules and enterprise-class capabilities to help you implement online real-time scenarios.
Learn more with a free 30-day trial: https://www.alibabacloud.com/product/tair
Read previous post:
[Infographic] Highlights | Database New Feature in August 2023
Read next post:
About Database Kernel | PolarDB Optimizer Query Transformation - Window Functions
Comments
Related Products
-
Cloud Migration Solution
Secure and easy solutions for moving you workloads to the cloud
Learn More -
Database Migration Solution
Migrating to fully managed cloud databases brings a host of benefits including scalability, reliability, and cost efficiency.
Learn More -
Oracle Database Migration Solution
Migrate your legacy Oracle databases to Alibaba Cloud to save on long-term costs and take advantage of improved scalability, reliability, robust security, high performance, and cloud-native features.
Learn More -
ISV Solutions for Cloud Migration
Alibaba Cloud offers Independent Software Vendors (ISVs) the optimal cloud migration solutions to ready your cloud business with the shortest path.
Learn More
More Posts by ApsaraDB
- [Infographic] Highlights | Alibaba Cloud Database New Features in October 2026
- Saying Goodbye to Write Stall: How Tair Serverless KV Keeps Latency Stable Under Extreme Write Pressure
- Enterprises Have AI Assistants Now. Why Are Office Workers Still So Drained?
- From Cloud Native to Agentic Native: PolarDB for PostgreSQL Rebuilds the Data Foundation for AI Agents
- Advanced Data Analytics in the AI Era: How Alibaba Cloud AIDBS Brings Specialized Models to Life
- Git for Your Database: PolarDB Lets Agents Experiment Safely
- AI Coding Context Keeps Getting More Expensive — Tair Built a Capability for That, and We Want You to Test It
- With PostgreSQL Firmly in Place as the Data Foundation, What Else Do Agents Need to Truly Run?
- The 6 Components of RAG, Actually Just Need 1 Database
- PolarDB-X Zero: Get an AI-Friendly Database in 30 Seconds with a Single Command
5646998924277397 November 7, 2023 at 3:11 am
6666