Azure – Networking – Part 23 – Azure Load Balancer -Configure Basic Load Balancer – 1
Hope you all are doing good. In our last article we have discussed about, the overview of Azure Load Balancer. Today in this article, we will continue with the same topic and demonstrate how to configure Azure Basic Load Balancer. So let’s start :).
Tool Installation Articles :
- Configure Azure Command Line Interface ( Azure CLI) On Windows
- Configure PowerShell For Microsoft Azure Az Module On Windows
Previous Azure Series :
- Learn Basics Of Azure Networking In 100 Hours
- Learn Basics Of Microsoft Azure Storage services
- Learn Basic Of Azure Active Directory And Azure Identity And Access Management
- Azure DevOps – Learn at one place
- Learn Basics Of Lift-And-Shift Migration To Azure
If you have missed our previous articles on Azure Networking, please check it in following links.
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:
- Setup two new windows VM
- Install IIS and configure Default.html page for Testing
- Create Azure load balancer
- Create a virtual network
- Create a backend pool
- Create health probes
- Create a load balancer rule
- Add virtual machines to the backend pool
1 . Setup two new windows VM
As per the above task, the first task is to setup the virtual machines, for our web servers and which will be serving users request and these server will be configured behind Load Balancer.
Note: Create both the VMs in an Availability Set, because if we are configuring multiple server behind the Basic load balancer (LB) , then those VM should be under a availability set or in a Virtual Machine Scale Set(VMSS)
Step 1 – Log in to Azure Portal and move to Virtual Machine section . Hit on Create and then + Virtual machine to start creating a VM s sowing in the following figure.
Step 2 – When configuring VM, make sure we are providing a valid meaning full name also configure the Availability set s showing in the following figure.
Step 3 – As our server will get traffic on 80 port and also we need to access servers through RDP. We need to open the following ports.
Step 4 – After configured the Webserver-1, let’s configure another VM as Webserver-2 by selecting the same VNet and Available set as showing in the following figure.
We can see in the above figure, that we have successfully configure our both webserver and now if we want to check, the inbound configuration of both server, we can see it is allowing traffics from any where on port 80 and 3389.
2 . Install IIS and configure Default.html page for Testing
As our webserver are going to server requests, coming from internet on port 80, we should configure IIS on both server and configure a Default.html page to test our configurations.
Step 5 – To install IIS, there are different approaches like through script and manually etc. Here we will do it manually by connecting to server through RDP connection as showing in the following figures
Step 6 – Once we connect to the server, hit on Add Roles and Features. From Add Roles and Features wizard, select Web Server (IIS) and click on Add Features button s showing in the following figure. It will ask us to go through few more window and finally it will install the IIS on he server.
Step 6 – After installing the IIS, let’s create a Default.html page under C://inetpub/wwwroot folder as showing in the following figure. Also observe the content of the default.html page. This is only show the server name of the host.
Step 7 – Let’s do the same IIS installation and configure Default.html page on Webserver-2 s showing in the following figure.
Step 8 – Let’s browse default page of Webserver-1 by using it’s public IP as showing in the following figure, user can send request to server on port 80.
Let’s browse Default.html on Webserver-2 by using it’s public IP as showing in the following figure.
In this article we have started with our Lab exercise to demonstrate, how to configure Load Balancer. In this article today we have discussed how to configure our web servers, which will be behind our Load balancer. In our next article we are going to cover rest of the configurations to complete Load Balancer (LB) configuration.
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 🙂 .