Sunday, April 4, 2021

Azure Public Load Balancer Demo

 

Create two VM (webserver1, webserver2). 

In each VM select same availability set. for this you have to create new availability set. 


after creating two VM's we will create Load balancer for our VM's.


To create the Load balancers we will navigate to all services > networking > Load balancer
Click on Create Load Balancer button. 


Provide all the required information and click on Create button. Now our Load balancer is ready. 


Open this load balancer. here we need to do some changes. all fields which are marked in red needs to be changed one by one.


So, First click on Frontend IP configuration link on left side menu bar. here we have already provided Ip name. so we can skip this. 

Now go-to Backend pools.  add new backend pool. 
Select the created availability set. when you select the existing availability set then It will ask to set target virtual machine. you can add both created VM's in target to balance the load.


Now Go-to Health probes link. Add a new health probe. provide all information and click on Ok button.


Now go-to Load balancing rule link.  add new load balancing rule. provide all required information.


We have created all the required things for creating public load balancer. Now we will test this. 

Go-to both VM's by taking RDP connection and create IIS web server. 


After installing the web server on both VM, create html file named index.html under below dir. in both VM server.


Now copy the public Ip address of load balancer (lb-webserver) and paste it in any browser url and hit enter button.
You will see the data from VM2. after 4 minute(idle state) when you will refresh the page it will redirect to VM1.



0 comments:

Post a Comment