Task Statement 2.1: Design scalable and loosely coupled architectures.
📘AWS Certified Solutions Architect – (SAA-C03)
1. What Is Load Balancing?
Load balancing is the process of distributing incoming application traffic across multiple computing resources such as servers, containers, or virtual machines.
Instead of sending all user requests to a single server, a load balancer distributes them across several backend systems.
Why Load Balancing Is Important
Load balancing helps achieve:
- High availability – If one server fails, others continue serving requests.
- Scalability – More servers can be added when demand increases.
- Fault tolerance – Failures in one component do not stop the entire system.
- Better performance – Traffic is evenly distributed.
- Improved reliability – Applications remain accessible during heavy traffic.
In cloud environments like Amazon Web Services, load balancing is a key architectural component.
2. Elastic Load Balancing (ELB)
In AWS, load balancing is provided by a service called Elastic Load Balancing.
Elastic Load Balancing automatically distributes incoming traffic across multiple targets.
Supported Targets
Targets can include:
- EC2 instances
- Containers
- IP addresses
- Serverless services
A target group may contain one or many backend resources.
3. Types of AWS Load Balancers
AWS provides multiple types of load balancers. For the SAA-C03 exam, you should understand the differences.
1. Application Load Balancer (ALB)
Application Load Balancer operates at Layer 7 (Application Layer) of the OSI model.
It routes requests based on HTTP/HTTPS information.
Key Capabilities
- Content-based routing
- Host-based routing
- Path-based routing
- Support for containers and microservices
- Integration with container platforms
ALB is commonly used for modern web applications and microservices architectures.
2. Network Load Balancer (NLB)
Network Load Balancer operates at Layer 4 (Transport Layer).
It routes traffic based on IP protocol data (TCP/UDP).
Key characteristics:
- Extremely high performance
- Handles millions of requests per second
- Ultra-low latency
- Supports static IP addresses
Used for:
- Real-time applications
- High-performance systems
- TCP/UDP workloads
3. Gateway Load Balancer (GWLB)
Gateway Load Balancer is designed for network security appliances.
It allows deployment of security systems such as:
- Firewalls
- Intrusion detection systems
- Packet inspection tools
4. Classic Load Balancer (Legacy)
Classic Load Balancer is the older generation load balancer.
It supports basic Layer 4 and Layer 7 features but is mostly replaced by ALB and NLB.
4. Application Load Balancer (ALB) – Detailed Explanation
The Application Load Balancer is one of the most important services for the SAA-C03 exam.
It distributes HTTP/HTTPS requests to multiple backend targets.
5. Core Components of Application Load Balancer
1. Listener
A listener checks for incoming requests on a specific port and protocol.
Example configuration:
- HTTP – Port 80
- HTTPS – Port 443
When traffic arrives, the listener evaluates rules and forwards the request.
2. Listener Rules
Listener rules determine how traffic is routed.
Rules contain:
- Conditions
- Actions
Conditions can include:
- URL path
- Hostname
- HTTP headers
- Query parameters
Actions include:
- Forward to target group
- Redirect
- Return fixed response
3. Target Group
A target group is a collection of backend resources that receive traffic.
Targets may include:
- EC2 instances
- Containers
- IP addresses
- Serverless functions
The load balancer sends requests only to healthy targets.
4. Targets
Targets are the actual compute resources running the application.
Examples:
- Web servers
- API services
- Application containers
6. Health Checks
Health checks ensure that traffic is only sent to healthy resources.
The load balancer periodically checks targets using:
- HTTP
- HTTPS
- TCP
If a target fails health checks:
- It is marked unhealthy
- Traffic stops being sent to it
Once the target recovers, it automatically returns to service.
7. Routing Capabilities of Application Load Balancer
ALB supports advanced routing methods.
Path-Based Routing
Requests are routed based on the URL path.
Example architecture:
/api → API servers
/images → image service
/login → authentication service
This allows multiple services to run behind one load balancer.
Host-Based Routing
Requests are routed based on the domain name.
Example:
api.company.com → API servers
app.company.com → application servers
admin.company.com → admin system
Header-Based Routing
Traffic can be routed based on HTTP headers.
This is useful for:
- testing environments
- version-based routing
8. Load Balancing Algorithms
Load balancers distribute traffic using algorithms.
Common methods include:
Round Robin
Requests are distributed sequentially:
Request 1 → Server A
Request 2 → Server B
Request 3 → Server C
Least Outstanding Requests
Traffic is sent to the server with the fewest active requests.
This helps maintain performance during uneven workloads.
9. Integration With Other AWS Services
Application Load Balancer integrates with several AWS services.
Compute Services
ALB works with:
- Amazon EC2
- Amazon ECS
- Amazon EKS
This makes it ideal for container-based applications.
Auto Scaling
Integration with Amazon EC2 Auto Scaling allows automatic scaling.
When traffic increases:
- New instances are launched
- Load balancer starts sending traffic to them automatically
DNS Integration
ALB can be used with Amazon Route 53 to direct users to the load balancer.
10. High Availability With Load Balancers
AWS load balancers are automatically deployed across multiple Availability Zones.
An **Application Load Balancer:
- distributes traffic across zones
- continues working even if one zone fails
This ensures:
- high availability
- resilience
- fault tolerance
11. Security Features
Application Load Balancers include multiple security features.
HTTPS Termination
The load balancer can handle SSL/TLS encryption.
Certificates can be managed using AWS Certificate Manager.
Benefits:
- Encryption handled at load balancer
- Backend servers handle only application logic
Integration With Security Groups
ALB supports security groups to control allowed traffic.
Example rules:
- allow HTTPS traffic from internet
- allow internal communication to backend servers
12. Monitoring and Logging
Load balancers can be monitored using Amazon CloudWatch.
Metrics include:
- request count
- latency
- error rates
- healthy host count
Logs can also be stored in Amazon S3 for analysis.
13. Designing Scalable Architectures With Load Balancers
Load balancers are used in scalable architectures to:
- distribute user traffic
- prevent server overload
- improve fault tolerance
- allow horizontal scaling
- support microservices architectures
Typical architecture:
Users
↓
Route 53 (DNS)
↓
Application Load Balancer
↓
Multiple backend servers (EC2 or containers)
This design ensures that traffic is automatically distributed across multiple systems.
14. Important Exam Tips
For the SAA-C03 exam, remember the following key points:
Application Load Balancer
- Works at Layer 7
- Supports HTTP/HTTPS
- Provides advanced routing
- Ideal for microservices and container applications
Network Load Balancer
- Works at Layer 4
- Supports TCP/UDP
- Very high performance
Gateway Load Balancer
- Used for security appliances
Health Checks
- Automatically remove unhealthy targets
- Ensure traffic only reaches healthy systems
15. Key Takeaways
Load balancing is essential for building scalable, reliable, and highly available cloud architectures.
In AWS:
- Elastic Load Balancing distributes traffic automatically
- Application Load Balancer provides intelligent Layer 7 routing
- Health checks improve reliability
- Integration with Auto Scaling supports dynamic scaling
These concepts are critical for designing loosely coupled architectures, which is a major focus of the AWS Certified Solutions Architect – Associate (SAA-C03) exam.
