Task Statement 3.4: Determine high-performing and/or scalable network architectures.
📘AWS Certified Solutions Architect – (SAA-C03)
Overview
Load balancing is the process of distributing incoming network traffic across multiple targets (like EC2 instances, containers, or IP addresses) to:
- Improve availability: If one server fails, traffic is automatically sent to healthy servers.
- Increase scalability: Handles more users by adding more servers behind the load balancer.
- Optimize performance: Ensures no single server gets overwhelmed, reducing delays.
In AWS, load balancing is mainly done using Elastic Load Balancing (ELB). ELB comes in three main types:
- Application Load Balancer (ALB) – Works at Layer 7 (HTTP/HTTPS).
- Network Load Balancer (NLB) – Works at Layer 4 (TCP/UDP).
- Gateway Load Balancer (GLB) – Works at Layer 3 (IP) for third-party virtual appliances.
Key Load Balancing Strategies
When selecting a strategy, you need to consider traffic type, latency requirements, and protocols used. AWS provides several routing/strategy options:
1. Round Robin
- How it works: Sends traffic sequentially to all targets in a group.
- Use case: Works well when all servers have similar capacity and workload.
- AWS relevance: ALB distributes requests using a modified round-robin algorithm for HTTP/HTTPS. NLB does round-robin at the TCP connection level.
2. Least Connections
- How it works: Sends traffic to the server with the fewest active connections.
- Use case: Ideal when servers handle long-running sessions, e.g., WebSocket connections or streaming sessions.
- AWS relevance: Classic Load Balancer (CLB) supports this; ALB does not explicitly support least connections, but ALB optimizes using request load tracking.
3. IP Hash / Source IP
- How it works: Uses the client’s IP address to determine which server handles the request, ensuring sticky sessions.
- Use case: When a client needs to always reach the same server for session consistency (e.g., shopping cart data in a web app).
- AWS relevance: ALB supports sticky sessions via cookies rather than IP hash.
4. Weighted Routing / Target Weight
- How it works: Assigns weights to each target. Higher weight gets more traffic.
- Use case: Gradually shift traffic to new servers during deployment or when some servers are more powerful.
- AWS relevance: ALB and Route 53 can implement weighted routing for traffic across multiple regions or servers.
5. Health-Based Routing
- How it works: Only sends traffic to targets that are healthy (based on health checks).
- Use case: Ensures fault tolerance; unhealthy servers automatically removed from rotation.
- AWS relevance: All ELB types perform health checks; unhealthy instances are skipped until they pass checks.
Choosing the Right Load Balancer in AWS
| Requirement | Recommended AWS Load Balancer |
|---|---|
| Web applications (HTTP/HTTPS) with content-based routing | ALB |
| TCP/UDP connections with high throughput and low latency | NLB |
| Virtual appliances / security / firewall inspection | GLB |
| Simple legacy load balancing | CLB |
Advanced Considerations for the Exam
- Cross-Zone Load Balancing
- Distributes traffic evenly across multiple Availability Zones (AZs).
- Enabled by default for ALB and can be enabled for NLB.
- Increases resiliency and prevents traffic spikes in one AZ.
- Auto Scaling Integration
- ELB can automatically integrate with Auto Scaling groups.
- When a new instance launches, the load balancer automatically starts sending traffic to it.
- TLS/SSL Termination
- ALB and NLB can handle TLS termination, offloading encryption tasks from the servers.
- Improves server performance by reducing CPU usage.
- Sticky Sessions
- ALB supports session-based stickiness, so a client repeatedly connects to the same target.
- Useful for stateful applications like chat apps.
- Global Load Balancing
- Using Route 53 + ELB, you can distribute traffic across multiple regions.
- Helps meet latency and disaster recovery requirements.
Summary for Exam
When selecting a load balancing strategy in AWS:
- Match the LB type to traffic:
- ALB → HTTP/HTTPS, content-based routing, path-based routing
- NLB → TCP/UDP, ultra-low latency, high throughput
- GLB → Third-party appliances, Layer 3 routing
- Select the routing algorithm based on session, capacity, and connection type:
- Round Robin → Default, simple load
- Least Connections → Long sessions
- Weighted → Gradual traffic shift / uneven server capacity
- Sticky / Session → Stateful apps
- Integrate with health checks and Auto Scaling for high availability.
- Enable cross-zone load balancing for multi-AZ distribution.
Exam Tip: Know ALB vs NLB differences, routing strategies, sticky sessions, health checks, and auto-scaling integration. Most questions ask which LB type and strategy fit a scenario.
