An enterprise financial portal hosts its application on Amazon EC2 instances inside an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The portal utilizes an Amazon RDS for PostgreSQL database for order transactions and query retrieval. During market opening daily, traffic surges by a factor of within less than minutes. During these spikes, users encounter HTTP 503 Service Unavailable and HTTP 504 Gateway Timeout errors. Performance logs reveal the following:
1. Database read queries spike, leading to CPU exhaustion on the DB instance and connection pool exhaustion on the EC2 instances.
2. The ALB drops connections immediately at the start of the traffic surge.
3. The ASG launches new instances to scale out, but before these instances finish bootstrapping, the ASG launches additional instances, leading to compute resource thrashing.
Which TWO actions should the Solutions Architect take to resolve these performance issues?
- Migrate the database to Amazon Aurora PostgreSQL, configure Aurora Replicas, and modify the application to send read queries to the reader endpoint.Answer
- Request AWS Support to pre-warm the Application Load Balancer, and increase the Auto Scaling group cooldown and warm-up periods to exceed the instance bootstrapping duration.Answer
- CConfigure the application to route read queries to the standby replica of the Multi-AZ Amazon RDS PostgreSQL DB instance to offload the primary instance.
- DDecrease the Auto Scaling group cooldown period to seconds to allow instances to spawn more rapidly in response to the sudden spike.
- ERely on the default automatic scaling of the Application Load Balancer to dynamically scale for the burst, and configure step scaling policies with a -second evaluation period.