MLS-C01 Question 287
Select 3You are deploying a machine learning model for real-time inference in a production environment. The model is hosted on multiple AWS EC2 instances behind an Application Load Balancer (ALB). During peak hours, you notice an uneven distribution of requests between instances, causing performance bottlenecks. What can you do to ensure better load balancing across the instances?
- A
Enable sticky sessions on the Application Load Balancer.
- B
Configure the Application Load Balancer to use a weighted round-robin routing algorithm.
- C
Ensure the health checks on the Application Load Balancer are properly configured.
- D
Use AWS Auto Scaling to dynamically adjust the number of EC2 instances behind the ALB.
- E
Switch to a Network Load Balancer for better performance.
Show answer and explanation
Correct answers: B, C, D
Explanation
To address uneven load distribution, it is crucial to use a proper routing algorithm such as weighted round-robin, ensure only healthy instances receive traffic via health checks, and dynamically scale instances to meet demand using AWS Auto Scaling. Sticky sessions and switching to a Network Load Balancer are not appropriate solutions for this specific issue of uneven request distribution.
- A. Incorrect.
Enabling sticky sessions causes requests from the same client to be routed to the same instance, which can lead to an uneven distribution of requests and is not suitable for this scenario.
- B. Correct.
Weighted round-robin ensures a more balanced distribution of requests across instances, which can address the uneven request issue.
- C. Correct.
If health checks are not properly configured, unhealthy instances may still receive traffic, exacerbating performance bottlenecks.
- D. Correct.
AWS Auto Scaling adjusts the number of instances dynamically, ensuring enough capacity to handle peak loads while maintaining balanced traffic among instances.
- E. Incorrect.
A Network Load Balancer is designed for high-performance, low-latency scenarios, but it does not solve the issue of uneven traffic distribution across instances.