Middleware Layer Migration
- Redis migration
Use Redis for caching and database storage. You usually do not need to migrate cache data. Most of the time, data is re-cached in Huawei Cloud SQL databases. Migrate data only if Redis serves as your main database. In web scenarios, you do not need to move cached sessions. When a client logs in again, the data is stored in Huawei Cloud DCS.
- Offline backup import
You can import backup files to Redis 3.0, 4.0, and 5.0. RDB backups from self-hosted Redis 5.0 cannot be imported. Export AOF or RDB backup files to use DCS for migrating data from on-premises or third-party cloud Redis services. This is a full migration, so new data created during the process will not be migrated.
Migration slows down if the source server has more than 10 GB of data. This method is not recommended for servers with over 10 GB of memory usage.
Figure 1 Redis migration - The migration process is as follows:
- Back up your source Redis data.
- In IDC, use a third-party tool or set a policy to save backups to disks. See Redis CLI or Redis port for details.
- Use the backup feature to export the RDB file to S3.
- Upload the backup to OBS.
- In EC2, use OBS Browser or obsutil to upload the backup files (aof/rdb) to OBS in the same region as DCS.
- In S3, create an OMS task to move the RDB backup file to OBS in the same region as DCS.
- Set up a DCS migration task.
- On the DCS console, create a migration task, choose the backup file import option, select the aof or rdb file from the source OBS, and configure other settings to start the task.
- Check and compare data on both sides using DCS.
- Run the redis query command info keyspace.
- Back up your source Redis data.
- Online migration
Online migration moves all data and synchronizes new changes in real time. This needs the source and destination to connect over a private network. Also, the SYNC and PSYNC commands must be enabled on the source Redis.
Figure 2 Online migrationThe migration process is as follows:
- Create a DCS migration task.
On the DCS console, create a migration task. Choose the online migration mode. Select either full migration or full plus incremental migration as needed. Set other parameters to start the task.
- Check and compare data on both sides using DCS.
After the migration task is complete, run the Redis query command info keyspace.
- Message middleware migration
Message middleware includes Kafka, RabbitMQ, RocketMQ, and IBM MQ. In a migration project, these systems are typically moved using a policy switchover method.
Figure 3 Message middleware migrationThe migration process is as follows:
- Stop enterprise applications and message production until all messages are consumed.
- Stop the consumption service.
- Start the message production and consumption services on Huawei Cloud, receive customer traffic, and check if services work normally.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot