In this short blog, we will show you how to create an Azure Load Balancer Rule. Azure Load Balancer allows for the creation of rules to control traffic to the backend pool. Here’s a brief overview of the steps required to make a load balancer rule in Azure. 

  1. Create a Load Balancer
  2. Create and Configure the Backend Pools
  3. Create a Health Probe, and lastly, 
  4. Create a Load Balancing Rule

The following blog will show you some details of the same, in-depth. 

Let’s get started with some basics first! 

What Is The Use of An Azure Load Balancer? 

We use an Azure Load Balancer to distribute inbound traffic loads to backend pool instances such as virtual machines or virtual machine scale sets. We do this according to configured load-balancing rules and health probes. Moreover, Azure Load Balancer provides high availability for your applications. 

Now, let’s move onto how to create a load balancer rule. 

How to Create an Azure Load Balancer Rule 

  1. Creating a Load Balancer

Here are the steps to create a load balancer! 

Step 1: Go to the Azure portal and search for Load Balancer and click Create Load Balancer. 

Step 2: Under Project details, select Subscription and Resource group. 

Step 3: Under Instance details, provide a Name, Region, Type, SKU, and Tier. 

creating load balancer
Creating Load Balancer

Which Type Of Load Balancer Should You Choose? 

Public load balancer You can use this type to load balance internet traffic to virtual machines.
Internal (private) load balancer is used to balance traffic from within a virtual network (not the internet traffic)

Which Type of SKU (Stock Keeping Unit) Should You Select? 

Basic This type of SKU provides basic features and is restricted to some limits. For example, the backend pool size is restricted to only 300 instances. It’s restricted to a single availability set etc. 
Standard The Standard tier load balancer is generally available and we can scale out to 1000 instances and can span any virtual machine in a single virtual network, including multiple scale sets, availability sets, and machines. 

Step 4: Under the public IP address, create or use an existing IP address and provide the IP address name. 

Step 5: If we choose a Standard Load Balancer, IP address assignment will be static and cannot be changed. If the Load Balancer is of the Basic type, we can choose the IP address assignment as either Dynamic or Static. 

Step 6: Select Availability zone and Routing preference. 

Step 7: Click Review + Create. 

Choosing IP Addresses
  1. Creating and Configuring A Backend Pool 

A backend pool contains the IP addresses of the virtual machines or the virtual machine details connected to the load balancer.  

Step 1: Select All services and select the load balancer (SysAllyLB) we have created Under Settings menu, select Backend pools, and click Add. 

Step 2: Provide a Name and select the Virtual network.  

Step 3: Under the Backend Pool Configuration, select the type either NIC or IP address. 

IP AddressIf you choose the IP address type, you can select the VMs to where the internet traffic is to be distributed by using the IP address of the VM.
NIC If you choose NIC type, you can add VMs to the Virtual Machines section.
choosing IP addresses
Choosing the IP addresses
adding virtual machines to the backend pool
Adding virtual machines to the backend pool.

[Note: 

You can only attach virtual machines in the exact same location and on the same virtual network as the load balancer. 

Virtual machines must have a standard SKU public IP or no public IP. And, all virtual machines must be under the same availability set.] 

Step 4: Click Add. 

  1. Create A Health Probe 

A load balancer monitors the status of your app or VM. The health probe adds or removes VMs from the load balancer backend pool based on their response to the periodic health checks. 

Step 1: Select All resources and select the load balancer (SysAllyLB) we have created. Under the Settings menu, choose Health Probes, and click Add. 

Step 2: Provide Name, Protocol, Port, Interval in seconds and Unhealthy threshold. 

health check
Interval This is the number of intervals in seconds between each health check. 
Unhealthy threshold This is the number of consecutive health check failures that must occur before a VM is considered unhealthy. 

Step 3: Click Add. 

  1. Create a load balancer rule 

We use a load balancer rule to define how to distribute traffic to VMs. You express the frontend IP configuration for the incoming traffic and the backend IP pool to receive the traffic. The source and destination port are defined in the rule. 

Step 1: Select All resources and select the load balancer (SysAllyLB) we have created Under Settings menu, select Load balancing rules, and click Add. 

Provide the following details: 

NameName of the rule
IP VersionType of IP 
Frontend IPIP of this Load balancer 
ProtocolTCP or UDP 
PortIncoming Port 
Backend portthe port to be redirected 
Backend poolBackend pool created 
Health probeHealth probe created

Step 2: Click OK. 

create an azure load balancer rule
Create an Azure Load Balancer Rule

Wrapping Up

So follow these steps and create your own load balancing rules in Azure. 

At SysAlly, we experiment with Cloud and the most useful information is passed on to the world as blogs. Signup for the updates.

Until later, here’s SysAlly signing off!

Get new insights right to your inbox

How can our experts help you?

Schedule your consultation

You may also like

  • By admin
  • in DevOps

Agile vs DevOps: What’s the difference

  • Nov 18, 2022 .
  • 9 min min
Read More
  • By admin
  • in DevOps

DevOps as a Service: All You Should Know

  • Aug 9, 2022 .
  • 9 min min
Read More
  • By admin
  • in Containerization

Containerization VS Virtualization: Understanding the Differences

  • Aug 4, 2022 .
  • 8 min min
Read More

Be in the know

Techno tips served hot! Subscribe now and stay atop.