0
0
Azurecloud~30 mins

Azure Load Balancer (Layer 4) - Mini Project: Build & Apply

Choose your learning style9 modes available
Azure Load Balancer (Layer 4) Setup
📖 Scenario: You are setting up a simple Azure Load Balancer to distribute incoming traffic evenly across two virtual machines. This helps keep your app available and responsive, like having two cashiers open at a store to serve customers faster.
🎯 Goal: Create an Azure Load Balancer with a frontend IP configuration, backend pool with two virtual machines, and a load balancing rule to distribute TCP traffic on port 80.
📋 What You'll Learn
Create a resource group named rg-loadbalancer
Create a public IP address named lbPublicIP
Create a load balancer named myLoadBalancer with a frontend IP configuration using lbPublicIP
Create a backend address pool named myBackendPool with two VM NICs: nicVM1 and nicVM2
Create a load balancing rule named httpRule to forward TCP traffic on port 80
💡 Why This Matters
🌍 Real World
Azure Load Balancers help distribute network traffic to multiple servers, improving availability and performance for web apps, APIs, and services.
💼 Career
Cloud engineers and infrastructure specialists use load balancers to build scalable and reliable cloud applications.
Progress0 / 4 steps
1
Create Resource Group and Public IP
Write Azure CLI commands to create a resource group named rg-loadbalancer in eastus and a public IP address named lbPublicIP in that resource group with SKU Standard and static allocation.
Azure
Need a hint?

Use az group create to make the resource group, then az network public-ip create to make the public IP.

2
Create Load Balancer with Frontend IP Configuration
Write an Azure CLI command to create a load balancer named myLoadBalancer in resource group rg-loadbalancer using the public IP lbPublicIP as the frontend IP configuration named LoadBalancerFrontEnd.
Azure
Need a hint?

Use az network lb create with --frontend-ip-name and --public-ip-address options.

3
Create Backend Address Pool with VM NICs
Write Azure CLI commands to create a backend address pool named myBackendPool in load balancer myLoadBalancer and add two network interfaces named nicVM1 and nicVM2 to this backend pool.
Azure
Need a hint?

First create the backend pool with az network lb address-pool create, then add NICs with az network nic ip-config address-pool add.

4
Create Load Balancing Rule for TCP Port 80
Write an Azure CLI command to create a load balancing rule named httpRule on load balancer myLoadBalancer in resource group rg-loadbalancer that forwards TCP traffic on port 80 from frontend IP LoadBalancerFrontEnd to backend pool myBackendPool.
Azure
Need a hint?

Use az network lb rule create with the correct ports, protocol, frontend IP, and backend pool names.