What should the solutions architect do to resolve this issue?
Disable session affinity (sticky sessions) on the ALB
Replace the ALB with a Network Load Balancer
Increase the number of EC2 instances in each Availability Zone
Adjust the frequency of the health checks on the ALB’s target group
Explanations:
Disabling session affinity (sticky sessions) allows the ALB to distribute incoming requests more evenly across all EC2 instances, rather than favoring one instance based on previous connections. This can help balance the load and reduce latency for some requests.
Replacing the ALB with a Network Load Balancer (NLB) is not necessary in this scenario. NLBs are designed for handling TCP traffic and provide different capabilities compared to ALBs. The primary issue here is traffic distribution, which can be resolved by adjusting settings in the ALB itself.
Increasing the number of EC2 instances in each Availability Zone may help with scaling but does not address the underlying issue of unbalanced traffic distribution. Without changes to how the ALB handles session management or traffic routing, adding more instances could still lead to the same problem.
Adjusting the frequency of health checks does not impact how traffic is distributed among EC2 instances. Health checks determine the availability of instances but do not affect the load balancing behavior or traffic distribution.