This design improves on Design 2 by adding a Load Balancer and a second VM.
Topology: The VMs sit in a Spoke VNet. The Load Balancer distributes traffic.
+--------------+ +--------------------------+ +--------------+
| User | | HUB VNet | | SPOKE VNet |
| (Internet) | | (Firewall) | | (Web Farm) |
+------+-------+ +------------+-------------+ +------+-------+
| | |
v | (Peering) |
+------+-------+ v v
| Public IP | +------------+-------------+ +------+-------+
| (LB) |---------->| Azure Firewall |<--------->| Load |
+--------------+ | | | Balancer |
+--------------------------+ +------+-------+
|
v
+--------------+
| Web VMs |
| (AV Set) |
+--------------+
PRIMARY REGION (East US)
+-----------------------------------------------------------------------+
| HUB VNet: vnet-hub (10.0.0.0/16) |
| +-----------------------+ |
| | Azure Firewall | |
| +-----------|-----------+ |
| | |
| v (Peering) |
+---------------|-------------------------------------------------------+
|
+---------------|-------------------------------------------------------+
| SPOKE VNet: vnet-web-spoke (10.1.0.0/16) |
| +-----------------------+ |
| | Subnet: Frontend | |
| | [Standard LB] | |
| | |-- Backend Pool | |
| | |-- VM1 | |
| | |-- VM2 | |
| +-----------------------+ |
+-----------------------------------------------------------------------+
SECONDARY REGION (West US)
+-----------------------------------------------------------------------+
| DR SPOKE VNet |
| +-----------------------+ |
| | ASR Replicas (VM1/2) | |
| | (Stopped) | |
| +-----------------------+ |
+-----------------------------------------------------------------------+
1. User: Hits Public IP of LB.
2. LB: Hash-based distribution (5-tuple). Picks VM1.
3. VM1: Processes request.
4. Failure: If VM1 dies, Probe fails. LB sends all traffic to VM2.
1. Create Resource Group: rg-design03-lb. Region: East US.
2. Create VNet:
* Name: vnet-web-spoke.
* Address space: 10.1.0.0/16.
* Subnet: snet-frontend (10.1.1.0/24).
3. Peering: Peer vnet-web-spoke to vnet-hub.
1. Search: "Public IP addresses" -> + Create.
2. Name: pip-lb-web.
3. SKU: Standard (Required for Standard LB).
4. Tier: Regional.
5. Create.
1. Search: "Load Balancers" -> + Create.
2. Resource group: rg-design03-lb.
3. Name: lb-web.
4. Region: East US.
5. SKU: Standard.
6. Type: Public.
7. Frontend IP configuration:
* Add a frontend IP.
* Name: fe-web.
* Public IP address: Select pip-lb-web.
8. Backend pools:
* Add a backend pool.
* Name: bep-web.
* Virtual network: vnet-web-spoke.
* Save (Don't add VMs yet).
9. Review + create -> Create.
1. Create Availability Set:
* Search "Availability sets" -> + Create.
* Name: aset-web.
* Fault Domains: 2. Update Domains: 5.
* Create.
2. Create VM 1:
* Name: vm-web-01. Image: Windows Server 2019.
* Availability options: Availability set -> aset-web.
* Networking: vnet-web-spoke, snet-frontend. Public IP: None.
* Create.
3. Create VM 2:
* Name: vm-web-02. Same settings, same Availability Set.
* Create.
1. Go to lb-web -> Backend pools.
2. Click bep-web.
3. Add -> Select vm-web-01 and vm-web-02.
4. Save.
1. Health probes -> + Add.
* Name: probe-http. Protocol: TCP. Port: 80. Interval: 5.
* Add.
2. Load balancing rules -> + Add.
* Name: rule-http.
* Frontend: fe-web.
* Backend pool: bep-web.
* Protocol: TCP. Port: 80. Backend Port: 80.
* Health probe: probe-http.
* Add.
1. Install IIS on both VMs (via Bastion).
* PowerShell: Install-WindowsFeature -name Web-Server -IncludeManagementTools.
* Customize C:\inetpub\wwwroot\iisstart.htm to say "VM1" and "VM2".
2. Hit the Public IP of the LB.
3. Refresh to see load balancing (might need Incognito to break session affinity if set).