A company runs a high-traffic e-commerce application on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB). The application uses an Amazon RDS for PostgreSQL DB instance configured in a Multi-AZ deployment. During scheduled flash sale events, the application experiences severe performance issues. Database metrics show that CPU utilization on the primary DB instance spikes to and read latency increases significantly. Additionally, during the first few minutes of a flash sale, users experience HTTP 502 Bad Gateway and 504 Gateway Timeout errors, even though the Auto Scaling group begins launching new instances. Which combination of actions will resolve these performance bottlenecks?
- Deploy Amazon RDS for PostgreSQL Read Replicas to offload read queries from the primary database instance, and contact AWS Support to pre-warm the Application Load Balancer before the scheduled flash sale events.Cevap
- BConfigure the application to route read queries to the secondary Amazon RDS standby instance in the other Availability Zone to distribute the load, and set up an Auto Scaling Warm Pool for the EC2 instances.
- CDeploy Amazon RDS for PostgreSQL Read Replicas to offload read queries, and configure the Application Load Balancer with cross-zone load balancing enabled to handle the sudden traffic spikes without requiring manual pre-warming.
- DDeploy Amazon RDS for PostgreSQL Read Replicas to offload read queries, and reduce the Auto Scaling group's scaling cooldown period to a duration shorter than the instance initialization time to accelerate the launch of new instances.
Cevap
Deploying Amazon RDS for PostgreSQL Read Replicas to offload read queries from the primary database instance, and contacting AWS Support to pre-warm the Application Load Balancer before the scheduled flash sale events.
Deploying Read Replicas offloads the heavy read load from the primary RDS PostgreSQL instance, reducing its CPU and storage I/O utilization. Pre-warming the Application Load Balancer ensures that its internal nodes are pre-provisioned to handle the massive, sudden spike in traffic, avoiding HTTP 502 and 504 errors caused by scaling latency.
Adım Adım Çözüm
Anahtar Kavram
Scaling database read capacity using Read Replicas and managing sudden traffic spikes on load balancers via ELB pre-warming.