Task Statement 4.4: Design cost-optimized network architectures.
📘AWS Certified Solutions Architect – (SAA-C03)
In AWS, load balancing means distributing incoming application traffic across multiple servers so that:
- No single server becomes overloaded
- Applications stay fast and available
- Systems can scale automatically
The main AWS service for this is Elastic Load Balancing (ELB) from Amazon Web Services.
1. What is a Load Balancer?
A load balancer is a service that sits between users and application servers.
It:
- Receives incoming requests (web traffic)
- Checks healthy servers
- Sends each request to an appropriate backend server
This helps improve:
- Availability
- Scalability
- Fault tolerance
2. Types of AWS Load Balancers (Important for Exam)
AWS provides three main types under ELB:
1. Application Load Balancer (ALB)
- Works at Layer 7 (Application Layer – HTTP/HTTPS)
- Best for web applications and APIs
2. Network Load Balancer (NLB)
- Works at Layer 4 (TCP/UDP)
- Best for ultra-high performance and low latency
3. Classic Load Balancer (CLB)
- Old generation (not recommended for new designs)
👉 For the exam, ALB is the most important for modern architectures.
3. Application Load Balancer (ALB) – Core Concept
An Application Load Balancer (ALB) is designed for web-based applications.
It understands:
- HTTP requests
- URL paths
- Hostnames
- Headers
- Query strings
This makes it smarter than basic load balancing.
4. Key Features of ALB (Very Important for Exam)
4.1 Layer 7 Routing (Smart Routing)
ALB can route traffic based on:
a) Path-based routing
Example:
/api/*→ sends traffic to API servers/images/*→ sends traffic to image servers
b) Host-based routing
Example:
app1.company.com→ Server Group Aapp2.company.com→ Server Group B
👉 This allows multiple applications to use one ALB.
4.2 Target Groups
A target group is a set of backend resources:
- EC2 instances
- Containers (ECS/EKS)
- Lambda functions (yes, supported)
ALB sends traffic to target groups based on rules.
4.3 Health Checks
ALB continuously checks backend servers:
- If a server is unhealthy → it stops sending traffic there
- If it recovers → traffic resumes
This improves high availability.
4.4 SSL/TLS Termination
ALB can handle HTTPS encryption:
- Decrypts incoming HTTPS traffic
- Sends decrypted traffic to backend servers
This reduces workload on application servers.
4.5 Auto Scaling Integration
ALB works with Auto Scaling:
- When traffic increases → more servers are added
- When traffic decreases → servers are removed
ALB automatically distributes traffic to new instances.
4.6 Sticky Sessions (Session Persistence)
ALB can “remember” a user and send them to the same server:
- Useful for login-based applications
- Can be enabled using cookies
4.7 Multi-AZ Availability
ALB is deployed across multiple Availability Zones:
- If one zone fails → traffic continues in others
This improves fault tolerance.
4.8 Supports Modern Protocols
ALB supports:
- HTTP
- HTTPS
- WebSockets
- gRPC
This is important for modern microservices.
5. Cost Optimization with ALB (VERY IMPORTANT)
For the exam, cost optimization is a key concept.
5.1 ALB Pricing Model
ALB cost is based on:
- Number of Load Balancer Capacity Units (LCU)
- Data processed
- Number of requests
So cost depends on usage.
5.2 How ALB Helps Reduce Cost
1. Consolidation of multiple applications
Instead of:
- Creating 3 load balancers for 3 apps
You can:
- Use 1 ALB with routing rules
✔ This reduces infrastructure cost.
2. Efficient scaling
- Works with Auto Scaling
- Only uses resources when needed
3. Fewer backend servers under control
ALB removes unhealthy instances automatically, preventing wasted traffic.
4. Reduces need for multiple services
With path-based routing:
- One ALB can serve multiple APIs and websites
6. ALB vs NLB (Exam Comparison)
| Feature | ALB | NLB |
|---|---|---|
| OSI Layer | Layer 7 | Layer 4 |
| Protocols | HTTP/HTTPS | TCP/UDP |
| Routing | Smart (path, host) | Simple |
| Performance | Moderate | Very high |
| Use case | Web apps, APIs | Gaming, IoT, low latency apps |
👉 Exam tip:
- If question mentions URL-based routing → choose ALB
- If question mentions ultra-low latency → choose NLB
7. When to Use Application Load Balancer (Exam Scenarios)
Use ALB when:
- You are building a web application
- You need HTTP/HTTPS routing
- You want multiple apps behind one load balancer
- You need microservices or container-based routing
- You need API-based architecture
8. Common Exam Traps (Important)
❌ Wrong assumption: “Load balancer improves speed”
✔ Correct: It improves distribution and availability, not raw compute speed
❌ Wrong assumption: “ALB works with TCP only”
✔ Correct: ALB is HTTP/HTTPS only (Layer 7)
❌ Wrong assumption: “One ALB per application is required”
✔ Correct: One ALB can serve multiple applications using rules
9. Summary (Exam Revision)
Application Load Balancer (ALB) in Amazon Web Services:
- Works at Layer 7 (HTTP/HTTPS)
- Routes traffic based on URL path and hostname
- Uses target groups (EC2, containers, Lambda)
- Performs health checks
- Supports SSL termination
- Works with Auto Scaling
- Supports multi-AZ high availability
- Helps reduce cost by consolidating multiple applications
- Best for modern web applications and microservices
