SAA-C03 · Question #78
A company is building a new furniture inventory application. The company has deployed the application on a fleet of Amazon EC2 instances across multiple Availability Zones. The EC2 instances run behin
The correct answer is A. Disable session affinity (sticky sessions) on the ALB.. The issue described in the question, where incoming traffic seems to favor one EC2 instance, is often caused by session affinity (also known as sticky sessions) being enabled on the Application Load Balancer (ALB). When session affinity is enabled, the ALB routes requests from th
Question
A company is building a new furniture inventory application. The company has deployed the application on a fleet of Amazon EC2 instances across multiple Availability Zones. The EC2 instances run behind an Application Load Balancer (ALB) in their VPC. A solutions architect has observed that incoming traffic seems to favor one EC2 instance, resulting in latency for some requests. What should the solutions architect do to resolve this issue?
Options
- ADisable session affinity (sticky sessions) on the ALB.
- BReplace the ALB with a Network Load Balancer.
- CIncrease the number of EC2 instances in each Availability Zone.
- DAdjust the frequency of the health checks on the ALB's target group.
How the community answered
(49 responses)- A82% (40)
- B6% (3)
- C10% (5)
- D2% (1)
Explanation
The issue described in the question, where incoming traffic seems to favor one EC2 instance, is often caused by session affinity (also known as sticky sessions) being enabled on the Application Load Balancer (ALB). When session affinity is enabled, the ALB routes requests from the same client to the same EC2 instance. This can cause an imbalance in traffic distribution, leading to performance bottlenecks on certain instances while others remain underutilized. To resolve this issue, disabling session affinity ensures that the ALB distributes incoming traffic evenly across all EC2 instances, allowing better load distribution and reducing latency. The ALB will rely on its round-robin or least outstanding requests algorithm (depending on the configuration) to distribute traffic more evenly across instances. Option B (Network Load Balancer): The NLB is designed for Layer 4 (TCP) traffic and low latency use cases, but it is not needed here as the problem is with load balancing logic at the application layer (Layer 7). The ALB is more appropriate for HTTP/HTTPS traffic. Option C (Increase EC2 Instances): Adding more EC2 instances does not solve the root issue of uneven traffic distribution. Option D (Health Check Frequency): Adjusting health check frequency won't address the imbalance caused by session affinity.
Community Discussion
No community discussion yet for this question.