Q42 — AWS SAA-C03 Ch.11
Question 42 of 100 | ← Chapter 11
Q742. A company is building a new furniture inventory application. The company has deployed the application on a fleet ofAmazon 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?
- A. Disable session affinity (sticky sessions) on the ALB ✓
- B. Replace the ALB with a Network Load Balancer
- C. Increase the number of EC2 instances in each Availability Zone
- D. Adjust the frequency of the health checks on the ALB's target group
Correct Answer: A. Disable session affinity (sticky sessions) on the ALB
Explanation
To resolve the issue of incoming traffic favoring one EC2 instance and causing latency for some requests in the furniture inventory application deployed on a fleet of EC2 instances behind an Application Load Balancer (ALB), the solutions architect should consider the following:A. Disable session affinity (sticky sessions) on the ALB.Option A, disabling session affinity (sticky sessions) on the ALB, is a potential solution to distribute the traffic evenly across the EC2 instances. By default, ALB uses session affinity to route requests from the same client to the same EC2 instance. This can cause uneven distribution of traffic if the session affinity is not necessary for the application. Disabling session affinity ensures that each request is independently routed to an available EC2 instance, balancing the load across the fleet.Option B, replacing the ALB with a Network Load Balancer, is not the most appropriate solution for this issue. Network Load Balancer operates at the transport layer (Layer 4) and does not inherently provide a solution for evenly distributing traffic among EC2 instances. It is designed primarily for scenarios that require ultra-high performance, static IP addresses, or handling of TCP/UDP traffic.Option C, increasing the number of EC2 instances in each Availability Zone, may not effectively address the issue if the incoming traffic is not evenly balanced across the existing instances. Simply adding more instances without addressing the root cause of the imbalance may not result in an optimal solution.Option D, adjusting the frequency of the health checks on the ALB's target group, would not directly resolve the issue of unevenly distributed traffic. Health checks are used to determine the availability of EC2 instances and remove unhealthy instances from the load balancer rotation. Adjusting the frequency of health checks may be beneficial for overall health monitoring and responsiveness but is not the primary solution for resolving the issue of uneven traffic distribution.Therefore, the most appropriate solution to resolve the issue of traffic favoring one EC2 instance and causing latency would be to choose option A: Disable session affinity (sticky sessions) on the ALB. This will allow the ALB to evenly distribute the incoming requests among the available EC2 instances, reducing latency and improving overall performance.