3.1 Azure Load Balancer and Traffic Manager
📘Microsoft Azure Networking Solutions (AZ-700)
1. What is an Azure Load Balancer?
An Azure Load Balancer (ALB) is a service that distributes incoming network traffic across multiple Virtual Machines (VMs) or backend resources. This ensures high availability and reliability of your applications.
IT Example:
- Suppose you have a web application running on 3 VMs in Azure. If one VM fails, the Load Balancer automatically routes traffic to the healthy VMs.
2. Types of Azure Load Balancer
Azure provides two main types of Load Balancers:
| Type | Scope | Use Case | Example in IT Environment |
|---|---|---|---|
| Public Load Balancer | Internet-facing | Distributes traffic from the internet to your Azure VMs | Hosting a public website in Azure across multiple VMs |
| Internal Load Balancer (ILB) | Private network | Distributes traffic within a virtual network (VNet) | Balancing requests between backend database servers or internal APIs |
Exam Tip: Know the difference between Public vs Internal Load Balancer.
3. SKU Options
When creating a Load Balancer, you must choose an SKU:
| SKU | Features | Use Case |
|---|---|---|
| Basic | Single availability zone, supports fewer VMs, no SLA for zone failures | Small apps or dev/test environments |
| Standard | Zone-redundant, supports large-scale VMs, better security, SLA included | Production apps needing high availability |
IT Example: A production e-commerce site uses Standard Load Balancer for high availability and security.
4. Components of a Load Balancer
To create and configure a Load Balancer, you need to understand its components:
- Frontend IP Configuration
- The IP address that receives incoming traffic.
- Public LB: Frontend has a public IP.
- Internal LB: Frontend has a private IP in your VNet.
- Backend Pool
- The set of VMs that receive traffic from the Load Balancer.
- You can add VMs, VM scale sets, or network interfaces.
- Health Probe
- Checks the health of backend VMs.
- If a VM fails the health check, traffic is not sent to it.
- Example: HTTP probe on port 80 checks if a web server responds.
- Load Balancing Rules
- Define how traffic is distributed to backend VMs.
- Link frontend IP → backend pool → health probe → port/protocol.
- Example: HTTP traffic on port 80 goes to 3 web servers.
- Inbound NAT Rules (optional)
- Used to connect to individual VMs directly for management.
- Example: Remote Desktop (RDP) to a specific VM through the Load Balancer.
5. Creating a Load Balancer
You can create a Load Balancer using Azure Portal, Azure CLI, PowerShell, or ARM templates.
Steps in Azure Portal:
- Go to Azure Portal → Create a Resource → Load Balancer.
- Choose:
- Name
- Region
- SKU (Basic or Standard)
- Type (Public or Internal)
- Configure Frontend IP:
- Assign a new public or private IP.
- Create a Backend Pool:
- Add VMs or VM scale sets.
- Configure Health Probe:
- Define protocol (TCP/HTTP) and port.
- Create Load Balancing Rules:
- Map frontend → backend → probe → protocol/port.
- Review and Create.
IT Tip: Always test health probes first to make sure VMs are healthy and ready.
6. Configuring Advanced Features
- Inbound NAT Rules
- Useful for RDP/SSH access to backend VMs.
- Example: Forward port 50001 → VM1:3389.
- Outbound Rules
- Controls how backend VMs access the internet.
- Example: Ensure multiple VMs share a single public IP for outbound connections.
- Diagnostics and Monitoring
- Enable Azure Monitor to track metrics like:
- Data processed
- Health probe status
- Packet drops
- IT Example: Monitor HTTP probe failures to detect web server issues.
- Enable Azure Monitor to track metrics like:
7. Key Exam Concepts
- Difference between Public and Internal LB
- SKU differences: Basic vs Standard
- Backend pool and health probe configuration
- Frontend IP and load balancing rules
- NAT rules and outbound connections
- High availability zones for Standard SKU
- Protocols supported: TCP, UDP, and HTTP(s) for probes
Exam Tip: Always associate a health probe with your load balancing rule, or traffic will not properly route.
8. Real IT Scenarios
- Web Farm – Distribute HTTP traffic to multiple web servers.
- Database Tier – Balance SQL or NoSQL database requests internally.
- Application Gateway Integration – ALB can handle network layer (L4) traffic, while Application Gateway handles HTTP layer (L7) traffic.
✅ Summary for the Exam
- ALB ensures availability and scalability.
- Types: Public vs Internal.
- SKUs: Basic (small) vs Standard (production, high availability).
- Components: Frontend IP, Backend Pool, Health Probe, Load Balancing Rule.
- Optional: Inbound NAT, Outbound rules.
- Always test health probes and monitor traffic.
