Configuring Load Balancer In Microsoft Azure

Introduction

 
Azure Load Balancing provides a higher level of availability across the virtual machines. We can use the Azure portal to create a basic load balancer and balance internal traffic among virtual machines. In this article, we are going to learn how to configure a load balancer in Microsoft Azure.
 
We have already created two virtual machines; those are:
  • Virtual Machine 1: Web1
  • Virtual Machine 2: Web2 
Step 1
 
Open the Virtual Machine “Web1” and copy the Public IP address to verify the IIS web status.
 
Configuring Load Balancer In Microsoft Azure
 
Step 2
 
To verifying the IIS service, just paste the public IP address and hit enter. IIS server running successfully.
 
Configuring Load Balancer In Microsoft Azure
 
Step 3
 
Open the Virtual Machine “Web2” and copy the Public IP address to verify the IIS web status.
 
Configuring Load Balancer In Microsoft Azure
 
Step 4
 
To verify the IIS service, just paste the public IP address and hit enter. IIS server running successfully.
 
Configuring Load Balancer In Microsoft Azure
 
Step 5
 
In the Azure portal click on the “+ Create a Resource”, and then type “Load Balancer”.
 
Configuring Load Balancer In Microsoft Azure
 
Step 6
 
In the Load Balancer page click “Create” button to start the configuration.
 
Configuring Load Balancer In Microsoft Azure
 
Step 7
 
In this demo our Load balancer name is “AzureWeb” and the Public IP address name is AzPIP, and then hit “Review+Create” button.
 
Configuring Load Balancer In Microsoft Azure
 
Step 8
 
After successfully creating the Load Balancer, open the load balancer and check the overview.
 
Configuring Load Balancer In Microsoft Azure
 
Step 9
 
Now we are going to add our Virtual Machines to Load Balancer. To add the load balancer, click the “Backend pools” and click “+Add”
 
Configuring Load Balancer In Microsoft Azure
 
Step 10
 
Enter the backend pool name and then select where we are going to select the Virtual Machine set. Click “Associated to” in the drop down arrow and then select “Availability Set”.
 
Configuring Load Balancer In Microsoft Azure
 
Step 11
 
Under the “Availability set”,  select the availability set in this demo; our availability set name is “iisweb”.
 
Configuring Load Balancer In Microsoft Azure
 
Step 12
 
Click “+Add a target Network IP Configuration” to add the Virtual Machine and the Virtual Machine IP address.
 
Configuring Load Balancer In Microsoft Azure
 
Step 13
 
Select the Virtual Machine and then select the IP address, and then Click “+Add a target Network IP Configuration” to add another Virtual Machine.
 
Configuring Load Balancer In Microsoft Azure
 
Step 14
 
Select the Second Virtual Machine and then select the IP address, and then Click “Ok”.
 
Configuring Load Balancer In Microsoft Azure
 
Step 15
 
Now we can verify that both Virtual Machines are added to our Backend pools.
 
Configuring Load Balancer In Microsoft Azure
 
Step 16
 
Now, we need to configure health probes. Health probes is what Load Balancer provides for use with load-balancing rules. Click “Health Probes”, and then Click “+Add”
 
Configuring Load Balancer In Microsoft Azure
 
Step 17
 
Enter the Health Probes Name and click “OK”.
 
Configuring Load Balancer In Microsoft Azure
 
Step 18
 
Now, the Health Probes are successfully added.
 
Configuring Load Balancer In Microsoft Azure
 
Step 19
 
Now, we need to create the Load Balancing Rules, the Load Balancing rules is to maps the public IP address and port number of incoming traffic to the private IP address and port number of the Virtual Machine, Click “Load Balancing Rules” and then click “+Add”.
 
Configuring Load Balancer In Microsoft Azure
 
Step 20
 
Enter the name, our Frontend IP address is “40.121.205.135” this is our Public IP address, and our Backend pool is selected, so verify the settings and click “Ok”.
 
Configuring Load Balancer In Microsoft Azure
 
Step 21
 
Now we can verify our Load Balancer is configured, it’s showing our Backend pool and public IP address, so copy the Public IP address.
 
Configuring Load Balancer In Microsoft Azure
 
Step 22
 
Enter our Public IP Address and hit enter. Our Web1 server is responding, now I’m going to shutdown the Web1.
 
Configuring Load Balancer In Microsoft Azure
 
Step 23
 
Now, refresh the page. The Web2 server is responding.
 
Configuring Load Balancer In Microsoft Azure
 

Summary

 
In this article, we have learned how to configure Load Balancing in Microsoft Azure. If you have any clarification, feel free to comment under the comment box.


Similar Articles
IFS R&D International (Private) Limited
IFS is a global enterprise software vendor providing solutions that help companies get better return