Migrating MySQL database to Amazon Aurora for Landingi.com
The Cost-effectiveness and efficiency of Amazon Aurora, a relational database designed from the ground up for cloud infrastructures, is legendary. The solution was also the best choice for replacing the MySQL database used in the Landingi.com platform.
Introduction
Landingi.com is a fully-featured platform to run successful marketing campaigns with state-of-the-art tools for landing page creation, automation, and analytics. With more than 250 landing page templates and 50 pop-up templates, building a landing page from the ground up and launching a marketing campaign with its use is extremely simple. Advanced functionalities, such as A/B/x tests, smart sections, or integrations with external applications, maximize the landing page utilization and help to achieve a significantly higher conversion factor than typical websites. The Landingi platform is used by customers in 80 countries around the world.
Solution
After performing an initial infrastructure audit, Hostersi decided that the best solution will to perform a migration from MySQL to Amazon RDS Aurora, a MySQL compatible, relational database with automatic software updates, security backups, monitoring, and auto-scaling that offers up to 5x the bandwidth of standard MySQL.
The migration was performed using mysqldump and read replica (RDS/Aurora) tools.
Each stage of the migration process had to be thoroughly planned and tested before the application was switched to the new database.
In the first stage of the migration, we decided to go with traditional MySQL replication using binlogs in RAW format as this allowed for the highest replication efficiency and speed. The replication was run on Percona 5.5 and 5.6 databases respectively.
During the migration process, we managed to improve the database operation and reduce its size from 700GB to around 300GB.
VPC Peering was used to ensure secure data transfer during the database relocation between AWS accounts. Additionally, SSL connections were implemented in the database. Thanks to good planning and preparation, the migration process took about 10 minutes.
In the second stage, the existing database was Aurora, which was preceded by upgrading Percona to version 5.7. Next, a database snapshot was created and migrated to a newly created and configured database schema.
The entire migration process to Aurora consisted of the following steps:
- Stopping customer application traffic,
- Verifying, that all processes on the main base and read-only replica were completed,
- Verifying statuses of all databases and replicas in the replication structure,
- Shutting down existing replicas running between EC2 and RDS,
- Verifying the replication status on RDS and Aurora,
- Changing the main application database to AWS Aurora,
- Enabling customer production traffic to Aurora.
All of the 7 steps listed above took just 5 minutes!
Infrastructure scheme
Result
The migration resulted in an improved infrastructure for the Landingi.com platform. In addition tio the new database engine it was possible to reduce the database size by almost half and increase the platform's performance. Amazon Aurora offers uninterrupted service delivery and automates time-consuming administration tasks, e.g. applying configuration and security patches that previously required employee interaction.
Read also: