Question

Difficulty: MediumOptimizing Compute and Storage Performance

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 95%95\% 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?

  1. 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.Answer
  2. B
    Configure 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.
  3. C
    Deploy 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.
  4. D
    Deploy 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.

Answer

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.

Step-by-Step Solution

1
Identify database bottleneck.
The primary DB instance has 95%95\% CPU utilization and high read latency due to handling both read and write workloads.
Read traffic needs to be offloaded to separate compute/storage resources.
2
Choose appropriate database scaling option.
Deploy RDS Read Replicas to handle read queries, leaving the primary instance to handle writes.
RDS Multi-AZ standby instances cannot serve read traffic.
3
Address the ALB scaling latency.
Request AWS Support to pre-warm the ALB to the expected traffic volume before the flash sale.
Auto-scaling triggers are too slow for instant flash traffic spikes, leading to dropped connections.

Key Concept

Scaling database read capacity using Read Replicas and managing sudden traffic spikes on load balancers via ELB pre-warming.
Rate this question