Azure – Networking – Part 25 – Azure Load Balancer – Configure Basic Load Balancer -3



Hello Friends,

Hope you all are doing good. In our last article we have discussed about, how to configure Azure Basic Load Balance. Today in this article, we will continue with the configuration of Azure Basic Load Balancer. So let’s start :).

Tool Installation Articles :

  1. Configure Azure Command Line Interface ( Azure CLI) On Windows
  2. Configure PowerShell For Microsoft Azure Az Module On Windows

Previous Azure Series :

  1. Learn Basics Of Microsoft Azure Storage services
  2. Learn Basic Of Azure Active Directory And Azure Identity And Access Management
  3. Azure DevOps – Learn at one place

If you have missed our previous articles on Azure Networking, please check it in following links.

Part 1 – Basics of Azure Networking

  • *
  • *
  • *

Part 19 – Azure Traffic Manager 2 -Create Traffic Manager Profile using (Cloud Shell)

Part 20 – Azure Route Table

Part 21 – Azure Route Table 2 – Configure User Define Route (UDR)

Part 22 – Azure Load Balancer – Overview

Part 23 – Azure Load Balancer -Configure Basic Load Balancer – 1

Part 24 – Azure Load Balancer – Configure Basic Load Balancer – 2

Configure Azure Load Balancer :

In this section, I am going to show how to configure a Azure basic load balancer to distribute web traffic. This lab exercise includes the following tasks:

  1. Setup two new windows VM
  2. Install IIS and configure Default.html page for Testing
  3. Dissociate public IP and set private IP as static of each Virtual Machine
  4. Create Public IP for Load Balancer
  5. Create Azure load balancer
  6. Configure backend pool
  7. Create health probes
  8. Create a load balancer rule
  9. Testing

In our previous articles, we have configured our webservers as well as configured IIS and Default.html page on each server. So In this way we have completed following points.

  1. Setup two new windows VM
  2. Install IIS and configure Default.html page for Testing
  3. Dissociate public IP for VMS and set private IP as static
  4. Create Public IP for Load Balancer
  5. Create Azure load balancer

In this article we will cover the following points.

  • Configure backend pool
  • Create health probes
  • Create a load balancer rule
  • Testing

In our next article we will cover rest of the points. So let’s start with the next point.

6. Configure Backend Pool

In our previous articles, we have configure Basic Load Balancer and all servers, which needs to be configured in backend pool. In left hand side we can see different properties. We can configure those properties, if we want to ,as showing in the following figure. Now the next step is to configure the Backend Pool.

Figure 1 : Azure Networking – Load Balancer – Create Load Balancer

To configure or create a Backend pool , let’s move to the Load Balancer resource as showing in the above figure and then click on Backend pools => click on +Add button to configure a new Backend Pool as showing in the following figure.

Figure 2 : Azure Networking – Load Balancer – Create Backend pools

Once we are on Add backend pool page, we need to provide all required information. As showing in the following figure, we need to give an meaningful Name and then select the Virtual Network. The next is Associated to property, where it has 3 options as Unassociated, Virtual Machines and Virtual Machine Scale Set.

Figure 3 : Azure Networking – Load Balancer – Create Backend pools

Here in the following figure we can see, when I choose, Virtual machine scale set, then it allow me to provide the Virtual machine scale set name and it’s IP.

Figure 4 : Azure Networking – Load Balancer – Create Backend pools

And in the following figure we can see, when I choose, Virtual machine, it is allowing me to add the Virtual machines.

Figure 5 : Azure Networking – Load Balancer – Create Backend pools

To add virtual machines in the backend pool, click on +Add button and it will open Add virtual machines to backend pool page, then let’s select those VMs we want add and then click Add button to add them to the list of virtual machine as showing in the following figure.

Figure 6 : Azure Networking – Load Balancer – Create Backend pools

As we can see in the following figures, now it included both of selected virtual machine to the list. let’s leave IP version as IPv4 then click on Add button to associate them to the backend pool. Just remember that, when configuring basic load balancer , if we want to add multiple VMS in backend pool then those VMs must be part of a Availability Set and if we want to add any public IP with VM then that must be a basic SKU.

Figure 7 : Azure Networking – Load Balancer – Create Backend pools
Figure 8 : Azure Networking – Load Balancer – Create Backend pools

7. Configure Health Probes

Now next is to configure the Health Probe. Here we will click +Add to add a new health probe as showing in the following figure.

Figure 9 : Azure Networking – Load Balancer – Create Health Probes

In turn it will open Add health probe window, where we can configure our new health probe. Since this is a basic load balancer, we have two choice here for protocol. One is TCP and the other one is HTTP protocol. Here we are choosing HTTP protocol and set the path to our /Default.html page as showing in the following figure and click Add button to add the Health Probe.

Figure 10 : Azure Networking – Load Balancer – Create Health Probes

What’s going to happen here, after an interval of every 5 seconds the load balancer is going to imitate a very simple HTTP handshake, this is basically a very simple request that will happen between load balancer and Virtual Machine. if the virtual machine, gives a successfully acknowledgement at the TC protocol layer then the load balancer will get to know the VM is healthy. If the load balancer does not get a successful health probe response back and after two consecutive failure then it will mark that particular VM as unhealthy.

8. Configure Load Balancing Rules

Now the time come to configure the last setting and it is Load Balancing Rules. To configure it , click on Load Balancing Rules link from left navigation of Load balancer then click +Add button.

Figure 11 : Azure Networking – Load Balancer – Create Load balancing rules

it will open Add load balancing rule page, where we are going to tell the load balancer , when a request come from a users on the front end IP address, the public IP address assigned on to the load balancer. If request come on port 80 of the load balancer, then direct the traffic on to the backend pool on again port 80 . because we have IIS that is listening the request on port 80 and here we can direct the request on to the KJ back end pool using the health probe.

Figure 12 : Azure Networking – Load Balancer – Create Load balancing rules

We can configure our rule as specified in the above figure and click Add button to end the configuration. It will take some time to deploy the configuration and once it is done we can see rule in the list as showing in the following figure.

Figure 13 : Azure Networking – Load Balancer – Create Load balancing rules

9. Testing

Now we have done with the configuration of our load balancer, it is time to test our load balancer. We will test the configuration using two different browser. So first let get the frontend IP address of the load balancer. To get the Frontend IP address , go to the Overview page of he load balancer and copy the IP as showing in the following figure.

Figure 14 : Azure Networking – Load Balancer – LB FrontEnd IP – Public IP

First we will test on Chrome browser, so open the browser and paste the coped IP address followed by the Default.html page (40.113.98.238/Default.html) as showing in the following figure it is directing the request to Web server 1.

Figure 15 : Azure Networking – Load Balancer – Testing On Chrome Using IP

When we browse the same URL in IE browser, the load balancer direct the traffic to Web server 2 as we can see in the following figure.

Figure 16 : Azure Networking – Load Balancer – Testing On IE Using IP

Now it is confirmed, that the LB is directing the traffic to different VM. Still I had one thing to test and that is the DNS name of the public IP, which we associated with the frontend IP of load balancer. Here I have used the DNS name of the public IP in sated of IP address but LB recognize the DNS and forward the traffic to web server 1.

Figure 17 : Azure Networking – Load Balancer – Testing On IE Using DNS

With the above information, I am concluding this article. I hope this is informative to you. Please let me know if I missed anything important or if my understanding is not up to the mark. Keep reading, share your thoughts, experiences. Feel free to contact us to discuss more. In our next article we will continue with the Lab exercise with configuring load balancer.

If you have any suggestion / feedback / doubt, you are most welcome. Stay tuned on Knowledge-Junction, will come up with more such articles.

Thanks for reading 🙂 .

Manas Ranjan Moharana

Around 11+ years of total IT experience and since last 10 years working on almost on all version of SharePoint .Interested in learning and sharing something new to be helthy.

You may also like...

4 Responses

  1. December 24, 2021

    […] you all are doing good. In our last article we have discussed about, how to configure Azure Basic Load Balance. Today in this article, we will discuss on Outbound Rule of Azure Load […]

  2. January 1, 2022

    […] a very Happy New Year. Hope you all are doing good. In our last article we have discussed about, how to configure Azure Basic Load Balance. Today in this article, we will start with a new important Networking concept Network Address […]

  3. March 13, 2022

    […] Part 25 – Azure Load Balancer – Configure Basic Load Balancer -3 […]

  4. March 20, 2022

    […] Part 25 – Azure Load Balancer – Configure Basic Load Balancer -3 […]

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: