A national education board is hosting an online portal for high school exam results. The portal experiences virtually no traffic throughout the year, but when results are released, it experiences an immediate influx of requests per second within a -minute window. The current architecture consists of an Application Load Balancer (ALB) distributing traffic to Amazon EC2 instances in an Auto Scaling Group, with a backend Amazon RDS for MySQL Multi-AZ database. During a mock release, the system failed due to ALB HTTP 503 (Service Unavailable) errors and database exhaustion from read queries. How should the solutions architect redesign the architecture to handle the next release?
- AEnable read traffic routing to the standby instance of the RDS MySQL Multi-AZ deployment to distribute the read query load. Rely on the default auto-scaling behavior of the Application Load Balancer to scale out as client connections increase.
- BDeploy Amazon ElastiCache for Memcached to cache database query results, configuring multi-AZ replication to ensure the cache layer is highly available. Rely on target tracking scaling policies on the Application Load Balancer to automatically scale capacity during the event.
- Configure Amazon CloudFront in front of the Application Load Balancer to cache static assets. Migrate the backend database to Amazon Aurora MySQL, and configure Aurora Replicas with Auto Scaling to scale read capacity. Contact AWS Support to pre-warm the Application Load Balancer before the results release.Answer
- DMigrate the database to Amazon Aurora MySQL. Rely on the Application Load Balancer's automatic scaling to handle the incoming request rate, and configure the EC2 Auto Scaling group with a very short cooldown period to launch new instances as quickly as possible during the spike.
Answer
Configure Amazon CloudFront in front of the Application Load Balancer to cache static assets, migrate the database to Amazon Aurora MySQL with Auto Scaling Aurora Replicas to handle dynamic reads, and request AWS Support to pre-warm the ALB prior to the release.
The correct solution involves offloading static content caching to Amazon CloudFront to reduce load on the origin, migrating the database to Amazon Aurora MySQL to scale reads horizontally via Aurora Replicas, and pre-warming the Application Load Balancer by contacting AWS Support. Pre-warming ensures the ALB is provisioned with sufficient capacity to handle the sudden, massive traffic spike immediately without dropping connections.
Step-by-Step Solution
Key Concept
Handling massive, instantaneous traffic spikes by pre-warming load balancers, offloading static content using CloudFront, and scaling database reads horizontally with Aurora Replicas.
Estimated Time:2m 0s