Azure Load Balancer

Azure Load Balancer is a fully managed load balancing service that distributes incoming traffic across a pool of virtual machines (VMs) or services. This helps ensure that applications remain resilient to both software and hardware failures by stopping traffic routing to any failed VMs in the pool.

Key Features of Azure Load Balancer

  1. Load Balancing:
    • Utilizes a 5-tuple hash composed of source IP, source port, destination IP, destination port, and protocol to distribute traffic.
    • Allows configuration based on the source port and IP address from which the traffic originates.
  2. Port Forwarding:
    • Provides port forwarding capabilities, allowing you to avoid assigning a public IP address to each web server in a pool.
    • Facilitates maintenance activities by allowing remote desktop protocol (RDP) access to servers through a public IP address.
  3. Application Agnostic and Transparent:
    • Operates independently of the application layer, meaning it does not directly interact with TCP or UDP.
    • For scenarios requiring URL-based routing or multi-site hosting, the Azure Application Gateway is more suitable.
  4. Automatic Reconfiguration:
    • Automatically reconfigures itself when instances in the backend pool are scaled up or down.
    • Ensures efficient load distribution as VMs are added or removed.
  5. Health Probes:
    • Monitors the health of VMs in the backend pool.
    • Stops routing traffic to VMs that fail health probes, ensuring only healthy instances receive traffic.
  6. Outbound Connections:
    • Translates outbound flows from private IP addresses in the virtual network to the frontend IP of the load balancer.
    • Facilitates communication from the VMs to public IPs on the internet.

Configuration Elements of Azure Load Balancer

  1. Front-end IP Configuration:
    • Represents the IP address to which incoming traffic is directed.
    • Azure Load Balancer can have one or more front-end IP addresses, sometimes referred to as virtual IPs.
  2. Back-end Address Pool:
    • Consists of the pool of virtual machines that will receive traffic.
  3. Load Balancing Rules:
    • Define the mapping between the front-end IP configuration and the back-end address pool.
    • Specify how traffic is distributed across the VMs.
  4. Health Probes:
    • Used to track the health status of VM instances.
    • If a probe fails, the corresponding VM instance is automatically removed from traffic rotation.
  5. Inbound & Outbound NAT Rules:
    • Inbound NAT Rules: Define how incoming traffic is distributed from the front-end IP to the back-end IP.
    • Outbound NAT Rules: Manage how private VM IPs are translated to the load balancer’s public IP.

Creating Azure Load Balancer

Step 1: Create a Load Balancer

  1. Go to the Azure portal.
  2. Click on Create a Resource.
  3. Type in Load Balancer and select it from the results.

Step 2: Fill in Required Details

  1. On the Load Balancer creation page, fill out all required details such as:
    • Name
    • Region
    • Resource Group
    • SKU (Standard or Basic)
  2. Click on Review + Create.

Step 3: Review and Create

  1. You will be redirected to the review page to verify all the details.
  2. Once confirmed, click on Create.

Result

  • Your Azure Load Balancer is now created and ready for config