Challenges

  • Performance issue with the previous hosting.

  • Higher number of users during this run.

  • No backup policy.

  • Previously, the site was having monolithic architecture which was not compatible enough to cater the expected workload.

  • Expected users: 1,95,000

Aim

01

Achieving the 99.9% uptime while including the elasticity at infrastructure level and keeping the cost in check.

Providing a reliable backup solution.

Solution

  • 01

    01

    Created the autoscaling and configured the scaling policy for scale in and scale out based on CPU metrics. This has resolved the issue of bottleneck when having large number of visitors and the issue of excessive cost implied when the resources are underutilised.

  • 02

    02

    Classic load balancer to distribute the incoming traffic across a pool of instances based on their allocated resources and CPU metrics.

  • 03

    03

    AWS elasticache service for maintaining the sessions.

  • 04

    04

    For the backup, a shell script was used which generates an archive of the data and upload it to an S3 bucket twice a day.

  • 05

    05

    Configuring the network file storage for adding uniformity of data across the instances.

  • 06

    06

    Migrating the database to Amazon RDS to provide high performance and increased flexibility.

  • 07

    07

    Fine tuning of Apache for handling higher number of concurrent users.

Summary

After applying these solutions, the uptime received was 99.91% while keeping the cost below $1k.