Soru

Zorluk: Çok zorAuto Scaling and Elastic Load Balancing (ELB)

An enterprise application hosted on Amazon EC2 instances inside an Auto Scaling group (ASG) is positioned behind an Application Load Balancer (ALB). The ALB target group has stickiness enabled using ALB-generated duration-based cookies. The ASG is configured with a target tracking scaling policy based on the average CPU utilization metric. During a promotional event, a small number of heavy API clients initiate a massive volume of concurrent requests. System administrators observe that a few EC2 instances become severely overloaded and fail health checks, while the remaining instances in the ASG remain underutilized. The ASG does not scale out to add more capacity. Which action should the solutions architect take to resolve the performance imbalance and ensure the application scales effectively?

  1. A
    Configure the Application Load Balancer target group to perform health checks on a custom port instead of the traffic port, allowing the load balancer to bypass sticky routing for health monitoring.
  2. B
    Modify the subnet Network ACLs to statefully restrict inbound traffic from the heavy API consumers, redirecting their requests to newly spawned instances in a different Availability Zone.
  3. Disable target group stickiness on the Application Load Balancer and modify the application to store session state externally in an Amazon ElastiCache cluster.Cevap
  4. D
    Configure an Amazon Route 53 latency-based routing policy to directly resolve the application's domain name to the public IP addresses of the individual EC2 instances, bypassing the Application Load Balancer to distribute client requests.

Cevap

Disable target group stickiness on the Application Load Balancer and modify the application to store session state externally in an Amazon ElastiCache cluster.
Disabling target group stickiness on the Application Load Balancer allows traffic to be distributed evenly across all healthy EC2 instances in the Auto Scaling group using the configured load balancing algorithm (such as round-robin or least outstanding requests). Storing session state externally in Amazon ElastiCache ensures the application remains stateless, preventing localized overloads from heavy API consumers and enabling the target tracking policy based on average CPU utilization to scale the Auto Scaling group out or in accurately.

Adım Adım Çözüm

1
Analyze the current architecture's bottleneck caused by stickiness and target tracking.
Identify that ALB-generated cookie stickiness binds specific heavy clients to specific EC2 instances, causing localized CPU spikes on those instances.
Average CPU utilization of the ASG remains below the scaling threshold because underutilized instances balance out the average, preventing scale-out.
2
Evaluate the options for scaling stateless versus stateful application components.
Determine that making the application tier stateless by offloading session storage to a caching tier is necessary to distribute traffic evenly.
Decoupling session state allows any instance to handle any request, enabling effective load balancing.
3
Configure the Application Load Balancer and session storage backend.
Disable target group stickiness on the ALB and provision an Amazon ElastiCache cluster for external session storage.
This permits the ALB to distribute requests evenly via round-robin or least outstanding requests, ensuring that CPU utilization rises uniformly across the ASG and triggers auto-scaling correctly under heavy load.

Anahtar Kavram

Decoupling session state from compute instances to enable effective load balancing and auto-scaling.
Tahmini Süre:3m 0s
Bu soruyu puanla