Migrate on-premises RDS Instance to Amazon RDS using Data Migration Service!

Cloud Computing is no more a Buzz today. Every enterprise recognizes its adoption as a key to success for business to grow.

Business applications are already receiving massive data today due to the growth of users and their requirements. Enterprises still eyeballing to remain with the complexity of their applications which are monolithic in nature and needed to use complex joins and follow structured data management approach.

In Today’s scenario, no organization wishes to have a downtime. They are looking forward for a migration strategy which can move workloads virtually to cloud with no downtime so that they can take advantage of the scale, operational efficiency, and the multitude of storage options that are available Out of the Box.

Enterprises which are looking forward for a migration of their on-premises RDS instance workload to AWS cloud, should adopt below migration patterns as a best practice to ease out their migration strategy.

Target Architecture

AWS Data Migration Service — AWS DMS service helps enterprises to migrate databases to AWS quickly and securely. During the Migration process the source database remains fully operational, minimizing downtime to applications that reply on the database.

AWS Data Migration Service Architecture

1) Identify the Source and the Destination target source data stores.

2) Next you need to configure the endpoints for both source and destination data sources within AWS DMS

3) AWS DMS will provision the replication instance where all the configuration and tasks will reside

4) Replication task which specifics the actual data table to migrate and data transformation rules to apply.

a. Full Load task is where you will scan the complete table and pull as one of migration need

b. Change Data Capture (CDC) where changes in source data tables needs to be captured and sync back

In many scenarios, the source and the destination data stores are very different and have lot many compatibility issues and need additional overhead of transformation efforts before any successful migration. AWS SCT is extensible, so that you can address these scenarios using an agent — an external program that’s integrated with AWS SCT, but performs data transformation elsewhere (such as on an Amazon EC2 instance). In addition, an AWS SCT agent can interact with other AWS services on your behalf — such as creating and managing AWS Database Migration Service tasks for you.

Following are some of the Best when using AWS Data Migration Services (DMS):

· Keeping check on Performance of an AWS DMS Migration:

A number of factors affect the performance of your AWS DMS migration

· Resource availability on the source

· The available network throughput

· The resource capacity of the replication server

· The ability of the target to ingest changes

· The type and distribution of source data

· The number of objects to be migrated

Loading Multiple Tables in Parallel: By default DMS loads 8 tables at a time. In order to increase the performance, you can increase the number of parallel table loads incase you have a large replication instance. If you are using the small replication instance node, you should decrease the number of parallel load as it may impact the overall performance and efficiency.

DMS — Parallel Table Load

· De-focus on Indexes, Triggers & Referential Integrity Constraints: Indexes, triggers, and referential integrity constraints can affect your migration performance and cause your migration to fail. It all depends whether you do Full Load or CDC tasks.

Full Load: enterprises should plan to drop all primary and secondary indexes, referential integrity constraints, and data manipulation language (DML) triggers. One can delay their creation till the Full loads gets completed. You don’t need Indexes at time of Full load and can be created separately before full load.

DMS — Full Load Deletion & Creation of Indexes

For a full load + CDC task, we recommend that you add secondary indexes before the CDC phase. Because AWS DMS uses logical replication, secondary indexes that support DML operations should be in-place to prevent full table scans. You can pause the replication task before the CDC phase to build indexes, create triggers, and create referential integrity constraints before you restart the task.

DMS — Full Load + CDC Secondary Indexes

· Disable Backups and Transaction Logging: When migrating to Amazon RDS Instance, it is recommended to disable Backups and Transaction Logging onto Target data store until you are ready to cut over. Similarly, when migrating to non-Amazon RDS systems, disabling any logging on the target until after cut over is usually a good idea.

DMS — Disable Transactional Logging & Backups

· Use Multiple Tasks: using multiple tasks for a single migration can improve performance. If you have sets of tables that don’t participate in common transactions, you might be able to divide your migration into multiple tasks. Transactional consistency is maintained within a task, so it’s important that tables in separate tasks don’t participate in common transactions. Additionally, each task independently reads the transaction stream, so be careful not to put too much stress on the source database.

You can use multiple tasks to create separate streams of replication to parallelized the reads on the source, the processes on the replication instance, and the writes to the target database.

DMS — Multi Tasking

Conclusion:

So if Enterprises are planning their Migration Strategy where data plays a very important role. They should think of AWS Data Migration Service with recommended Best Practice to have maximum benefit out of it. The reliability of this service, alongside the reputation of AWS in cloud computing, provides exceptional support for the first-time adoption of database migration services.

Principal Solution Architect with over 14 years of extensive IT Architecture who share the enthusiasm for exploiting technology to create business value.