Create and configure an Azure Load Balancer

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:

TypeScopeUse CaseExample in IT Environment
Public Load BalancerInternet-facingDistributes traffic from the internet to your Azure VMsHosting a public website in Azure across multiple VMs
Internal Load Balancer (ILB)Private networkDistributes 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:

SKUFeaturesUse Case
BasicSingle availability zone, supports fewer VMs, no SLA for zone failuresSmall apps or dev/test environments
StandardZone-redundant, supports large-scale VMs, better security, SLA includedProduction 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:

  1. 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.
  2. Backend Pool
    • The set of VMs that receive traffic from the Load Balancer.
    • You can add VMs, VM scale sets, or network interfaces.
  3. 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.
  4. 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.
  5. 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:

  1. Go to Azure Portal → Create a Resource → Load Balancer.
  2. Choose:
    • Name
    • Region
    • SKU (Basic or Standard)
    • Type (Public or Internal)
  3. Configure Frontend IP:
    • Assign a new public or private IP.
  4. Create a Backend Pool:
    • Add VMs or VM scale sets.
  5. Configure Health Probe:
    • Define protocol (TCP/HTTP) and port.
  6. Create Load Balancing Rules:
    • Map frontend → backend → probe → protocol/port.
  7. Review and Create.

IT Tip: Always test health probes first to make sure VMs are healthy and ready.


6. Configuring Advanced Features

  1. Inbound NAT Rules
    • Useful for RDP/SSH access to backend VMs.
    • Example: Forward port 50001 → VM1:3389.
  2. Outbound Rules
    • Controls how backend VMs access the internet.
    • Example: Ensure multiple VMs share a single public IP for outbound connections.
  3. 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.

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

  1. Web Farm – Distribute HTTP traffic to multiple web servers.
  2. Database Tier – Balance SQL or NoSQL database requests internally.
  3. 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.
Buy Me a Coffee