On 30th Sept 2020 Pretius experts took part in AWS Migration GameDay. The online event run by AWS Poland is a team-based learning exercise where participants compete with each other. A winning team has to migrate a live e-commerce system to AWS in the shortest time using best-known practices.
One of our teams took second place on the podium moving the whole production workload to the cloud under six hours. In this article, we will present the case study used during the event and how our architects solved it.
The fictional company – Unicorn.Rentals is the leader of the Legendary Animal Rental Market. Their customers use the website built on WordPress and WooCommerce to rent unicorns for their children.
The company is growing fast and wants to expand globally. Their application should scale according to users’ traffic. Any downtime causes the company to lose money from not placed orders. The solution should also be cost-effective. Those goals are hard to achieve with their on-premises infrastructure.
How we handled it with AWS
The MySQL on-premises database was moved to Amazon Aurora – MySQL compatible relational database with built-in automatic security patching, backup, monitoring, and autoscaling. Data migration was handled by Database Migration Service. The tool helped provide real-time data replication from the on-premises database to AWS. Thanks to that solution, it was possible to switch data sources without the customers experiencing any downtime.
The WordPress instance was copied into Amazon EC2 virtual machine using CloudEndure. This tool is capable of replicating any virtual machine to AWS in minutes. It can be used for migrations and also for continuous replications for Disaster Recovery purposes.
AWS provided full environment monitoring and alerting with CloudWatch. The application was ready to switch the users’ traffic into the new environment.
Time to improve
The system had to handle higher traffic than before. AWS gives many possibilities in that area. EC2 instances can be copied and autoscaled with Auto Scaling Groups. Traffic can be handled with Elastic Load Balancing.
We decided to move WordPress from the virtual machine to Docker containers hosted by AWS Fargate – a serverless compute engine for containers. It freed us from having to maintain virtual machines. Every container was assigned the required amount of resources which also helped to avoid overprovisioning and improved cost-efficiency.
The competition time was over but the solution could be optimized even more.
- Page loading time could be reduced with Amazon CloudFront – Content Delivery Network with 220+ points of presence around the world. Most of the static content for pretius.com was loaded from CloudFront.
- Security could be improved even more with the AWS Web Application Firewall and Amazon GuardDuty – intelligent threat detection system.
Future growth with AWS
Thanks to the migration to AWS, Unicorn.Rentals improved the reliability and availability of its e-commerce platform. Their IT team could move their focus from infrastructure maintenance to developing new functionalities.
They could for example implement a recommendation system in their shop using Amazon Personalize or automate their marketing using Amazon Pinpoint.
To read about other migrations to AWS done by Pretius, visit: Benefits of migration of Oracle APEX applications to AWS.
To talk about possibilities offered by the cloud, contact us. Our architects will help you choose a cloud provider most suitable for your case. We will analyze, plan, and execute the whole migration and advise you on the possibilities of future development.