Elastic Load Balancing Algorithms
Elastic Load Balancing Algorithms determine how the load balancer distributes incoming traffic across the registered instances. AWS supports two types of load balancing algorithms: 1. Round Robin: This is a default method, where each instance gets an equal distribution of traffic, ensuring balanced utilization of resources. 2. Least Outstanding Requests: This method directs incoming traffic to the instance with the least number of outstanding requests, ensuring that no single instance gets overwhelmed. Both algorithms can further leverage Sticky Sessions to bind user sessions to specific instances, providing consistent user experience during peak times. By choosing an appropriate algorithm, you can achieve higher performance, fault tolerance, and availability for your applications.
Guide to Elastic Load Balancing Algorithms
Importance: ELB Algorithms play a fundamental role in distributing incoming application or network traffic across multiple targets, such as Amazon EC2 instances. This ensures the smooth functioning of applications by providing fault tolerance so that any single point of failure can be handled with minimal service disruption.
What it is: ELB Algorithms are part of the AWS Elastic Load Balancing service. They decide how to distribute incoming requests to targets based on factors such as the current load on individual targets. The choice of algorithm depends on your specific needs. AWS provides several types of load balancing algorithms such as round robin, least outstanding requests, and IP hash.
How it works: Based on the selected algorithm, the ELB evaluates the condition of targets and forwards incoming requests accordingly. For instance, the round robin method distributes requests evenly, while the least outstanding requests method prioritizes targets with fewest pending requests.
Exam Tips: When it comes to answering questions regarding ELB Algorithms on an exam, remember to:
- Understand how different types of algorithms work and when to use which type.
- Be aware of the comparison between various algorithms in terms of efficiency, speed, and demands.
- Have practical insights about real-world scenarios where certain algorithms are more suited.
AWS Certified Solutions Architect - Elastic Load Balancing Algorithms Example Questions
Test your knowledge of Elastic Load Balancing Algorithms
Question 1
A media streaming platform delivers HLS/DASH video over HTTPS and uses Amazon CloudFront for global edge delivery. In each AWS Region, it needs a load balancer that terminates HTTPS, performs path/host-based routing to separate microservices (such as video origin, authentication, and API), and supports canary or blue/green deployments by sending traffic to different sets of targets. Which Elastic Load Balancer configuration best fits these requirements?
Question 2
You host a game lobby over HTTPS where clients connect via HTTP(S)/WebSocket to a single load balancer endpoint. Each request includes a region code in the URL path (for example, /region/eu or /region/na). You maintain separate target groups for each region and need the load balancer to route requests to the correct target group based on the path. Which Elastic Load Balancer configuration should you use?
Question 3
In AWS, an Application Load Balancer is distributing HTTP(S) traffic to a homogeneous fleet of targets. During peak traffic, users see higher response times due to request queuing at busy targets. Which load-balancing algorithm should be selected to minimize per-request latency by routing new requests to the least busy target?