Home › Forums › AWS › AWS Certified Solutions Architect Associate › IMHO the answer is incorrect for this ALB question › Reply To: IMHO the answer is incorrect for this ALB question
-
Hi Dimaz,
Thanks for your further response and thoughtful points. I understand where you’re coming from, especially when it comes to stateful applications and the importance of session stickiness. However, based on the details provided, I’d like to reiterate why Option 1: Turn off sticky sessions, is the most appropriate answer for the scenario presented in the question.
The question clearly describes a situation where traffic favors a single EC2 instance, leading to latency issues due to the overloaded instance. In cases like this, one of the common causes is session stickiness (also known as session affinity), which directs all requests from a given client (based on the session) to the same EC2 instance.
When session stickiness is enabled on the Application Load Balancer (ALB), the traffic can become unevenly distributed, particularly when multiple users or sessions exist. This results in one EC2 instance receiving more traffic than others, which leads to overloading of that instance and latency in handling requests, as you mentioned.
As suggested in Option 1, disabling session stickiness would allow the ALB to distribute the traffic more evenly across all healthy EC2 instances. This helps prevent one instance from getting overloaded because all requests for the same session keep going to that instance. By turning off session stickiness, the load balancer ensures that requests are sent to different instances rather than always routing the same user session to one specific instance.
In a stateless application, this approach makes the most sense for achieving better load balancing, which directly addresses the problem described in the question. The goal here is to fix the issue of uneven traffic distribution, which is what the question focuses on.
Regarding stateful applications, you’re correct that session stickiness is critical for stateful applications that must preserve session data or ensure that users interact with the same EC2 instance throughout their session (e.g., for user authentication). In those cases, turning off sticky sessions would indeed cause user experience issues (e.g., users being logged out or encountering broken sessions).
However, the question doesn’t provide any information suggesting that the application is stateful or that session management is a critical part of the design. Therefore, based on the scenario as worded in the question, we assume that sticky sessions are likely the cause of the issue, and turning them off would resolve the uneven load distribution problem. If the application were stateful and session stickiness was essential, the solution would be different, but that’s not explicitly stated in the question.
Given the context of the question and the symptoms described (one EC2 instance receiving more traffic than others, leading to latency), Option 1: Turn off sticky sessions is indeed the most effective and appropriate solution. Disabling sticky sessions, in this case, would allow the ALB to distribute traffic more evenly across all EC2 instances, addressing the issue of latency and improving overall performance.
We will update the question to specify whether the application is stateful or stateless to ensure better clarity. This will help avoid any confusion about when turning off sticky sessions would be appropriate and provide the question as clearly as possible for all scenarios.
I hope this helps clarify the reasoning behind choosing Option 1 as the best solution for this particular scenario. Feel free to reach out if you’d like to discuss this further!
Best regards,
Nikee @ Tutorials Dojo