Soru

Zorluk: ZorOptimizing Compute and Storage Performance

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 1515 within less than 22 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?

  1. Migrate the database to Amazon Aurora PostgreSQL, configure Aurora Replicas, and modify the application to send read queries to the reader endpoint.Cevap
  2. 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.Cevap
  3. C
    Configure the application to route read queries to the standby replica of the Multi-AZ Amazon RDS PostgreSQL DB instance to offload the primary instance.
  4. D
    Decrease the Auto Scaling group cooldown period to 1515 seconds to allow instances to spawn more rapidly in response to the sudden spike.
  5. E
    Rely on the default automatic scaling of the Application Load Balancer to dynamically scale for the burst, and configure step scaling policies with a 1010-second evaluation period.

Cevap

Migrate the database to Amazon Aurora PostgreSQL to route reads to the reader endpoint, request AWS Support to pre-warm the Application Load Balancer, and increase the Auto Scaling group cooldown and warm-up periods to exceed the bootstrapping duration.
Migrating to Amazon Aurora PostgreSQL and leveraging Aurora Replicas resolves the database read-capacity bottleneck. Pre-warming the ALB ensures it is prepared for instantaneous traffic spikes, while increasing the ASG cooldown and warm-up periods prevents scaling thrashing by ensuring the scaling engine waits for launched instances to fully bootstrap before initiating further scale-out actions.

Adım Adım Çözüm

1
Address read-traffic database bottlenecks by migrating to an engine that supports read-scaling.
Migrating RDS PostgreSQL to Aurora PostgreSQL allows routing query reads to Aurora Replicas via the reader endpoint, freeing capacity on the primary writer.
Standard RDS PostgreSQL Multi-AZ standbys cannot serve queries, whereas Aurora Replicas actively serve reads and mitigate CPU/connection pool exhaustion.
2
Mitigate immediate connection failures at the load balancer tier during flash traffic.
Requesting ALB pre-warming from AWS Support guarantees the load balancer has sufficient capacity provisioned before the sudden traffic spike occurs.
Automatic ALB scaling is too slow for 15x traffic surges within a 2-minute window.
3
Adjust the compute tier scaling configurations to prevent instance thrashing.
Configure the ASG cooldown and warm-up periods to be longer than the bootstrapping time of the EC2 instances.
This prevents the ASG from evaluating metric alarms and scaling out prematurely while newly launched instances are still initializing.

Anahtar Kavram

Optimizing Compute and Storage Performance
Tahmini Süre:3m 0s
Bu soruyu puanla