CPS CHAPS is a teenage clothing subsidiary of JASPAL GROUP, Thailand which is distributed in the Central Department Store and started the website www.cpsclothing.com in 2016 to increase the sales. The website was initially running on a shared server and then moved to a dedicated one, but both were unable to handle the high traffic and extreme demand for their products. CPSCLOTHING is also expecting a sales growth of 30% every year and needed a long-term solution to cope with the demand.
Metclouds Technologies performed a detailed analysis of the existing system and traffic on the website to conclude that the existing server resources are not sufficient for the website because of the scalability it demands. So we chose Amazon Web Services ( AWS ) due to the cloud provider’s ease of use and a rich array of services that could be adopted to optimize the performance of the online store. The store infrastructure operates in the AWS Asia-Pacific (Singapore) Region and uses multiple Availability Zones for redundancy. Amazon Elastic Compute Cloud (Amazon EC2) instances run Amazon Linux and Magento CMS. Amazon Aurora RDS manages all database activities on the infrastructure. The infrastructure uses both Elastic Load Balancer and Autoscaling for better scalability and high availability. It also makes use of Redis ElastiCache integrated with Magento for faster response of the website.
The biggest challenge we faced during the project was the unavailability of a shared storage like EFS (Elastic File storage) and firewall like WAF( Web Application Firewall) in the Singapore region. We tackled the problem using SoftNAS (Software-defined Cloud NAS) and CloudFront respectively. We created a separate server for storage using SoftNAS and configured all autoscaling instances to be launched with the SoftNAS storage pre-mounted. An additional caching mechanism is implemented using CloudFront and we were able to attach a Web Application Firewall(WAF) to CloudFront which is not otherwise available in Singapore Region. This mechanism helps to prevent common web exploits that could affect application availability, compromise security, or consume excessive resources.
We also performed load and performance testing using jMeter on the website to make sure that the website is ready to handle more than the expected traffic.
Running the tools and infrastructure in AWS has delivered a range of benefits to CPSClothing. Purchasing a dedicated compute, storage and associated resources required to support the website at peak time would impose a sizable cost burden on the fledgeling business and risk these resources being underused during non-peak periods.
In addition, CPS CHAPS wanted to avoid dedicating valuable technical resources to maintain servers, storage, networks, and associated data centre facilities for CPSClothing. So moving to AWS Cloud Infrastructure helped them to cut both initial and running cost for their website.
Moving to the new infrastructure helped to achieve a 99.99% uptime and a reduced page load time of 5 seconds. This also ensures that the online store is constantly available for customers, limiting the risk of a poor experience that could push them to purchase from rival stores instead.
The infrastructure uses the following AWS services.
- Amazon EC2 with Amazon Linux as webservers
- Amazon EC2 with SoftNAS as Storage Server
- Elastic Load Balancer: To distribute the traffic to autoscaled instances
- ElastiCache with Redis: Integrated into Magento to store cache, session files and in turn helps in faster website loading
- RDS with Amazon Aurora: Database Server
- CloudFront with WAF: For faster content delivery and security
- Route 53: To manage DNS