45 minutes
---
rg-az104-lab15,
region: East US. Create.
vnet-lab15, Address space:
10.80.0.0/16, Subnets: subnet-backend with 10.80.1.0/24. Create.
- vm-web01 and vm-web02: both Ubuntu 22.04 LTS, StandardB1s,
vnet-lab15/subnet-backend with public IPs (so you can manage them
individually). Create.
- SSH into vm-web01 and run:
``bash
sudo apt-get update && sudo apt-get install -y nginx
echo "Server 1" | sudo tee /var/www/html/index.html
`
- SSH into vm-web02 and repeat (changing "Server 1" to "Server 2").
- Name: lb-lab15
- Type: Public
- SKU: Standard
- Region: East US
- Public IP: Create new (e.g., pip-lb15)
- Frontend IP name: feLB
- (Public IP already selected above)
- Name: beLB
- Subnet: select vnet-lab15/subnet-backend
> + Add.
and vm-web02 > Add.
Health probes determine if backend instances are healthy. If a probe fails, the load balancer removes that instance from the rotation until it recovers.
- Name: probe-http
- Protocol: TCP
- Port: 80
- Interval: 5
- Add.
- Name: rule-http
- Protocol: TCP
- Frontend port: 80
- Backend port: 80
- Backend pool: beLB
- Health probe: probe-http
- Session persistence: None
- Add.
in a browser multiple times — should see alternating
"Server 1" / "Server 2" responses.
- Name: appgw-lab15
- Tier: Standard v2
- Capacity: 1 instance
- Virtual network: vnet-lab15
- Subnet: Create new subnet-appgw with 10.80.2.0/24
- Public IP: Create new (e.g., pip-appgw15)
- Backend pools: select Create new
- Name: backendPool1
- Target type: IP addresses or FQDN
- Targets: add vm-web01's private IP (e.g., 10.80.1.4) and
vm-web02's private IP (e.g., 10.80.1.5)
(see Part 4).
- Listener name: listener-http
- Frontend IP: select public IP
- Port: 80
- Protocol: HTTP
- Path-based routing: Checked
- Path rules:
- Path: /api/ → backend pool backendPool1
- Path: /images/ → backend pool backendPool1 (or create separate pools)
- Default path: / → backend pool backendPool1
| Aspect | Basic LB | Standard LB |
|--------|----------|-------------|
| Backend pool | Up to 300 instances, single AVS | Up to 1000, VMs/VMSS across zones |
| SLA | None | 99.99% |
| NSG required on backend | No (open by default) | Yes (secure by default) |
| Availability Zones | No | Yes (zone-redundant) |
| Outbound rules | No | Yes (explicit SNAT config) |
> Delete resource group.