Azure Load Balancer distributes incoming traffic among healthy instances. It also delivers high availability and network performance to your applications.
Step 1. Login into your Microsoft Azure account.
Step 2. Click on the Load balancers option under the service panel.
Step 3. Click on Add button to create a new Load Balancer.
Step 4. Specify the Load balancer Details As per your requirements.As for now i am going to specify the following details.
Name – Specify the Name for your Load Balancer
Type – Public
Public IP address – As per your Requirements
Resource group – Create a new RG or use the existing RG but make sure RG must contain the port 80 in it.
Now click on Create button.
Step 5. Your Load balancer is created successfully.Click on your Load Balancer to view details of your Load balancer.
Step 6. Under the settings click on Health probes option.Health Probes offers the capability to monitor the health of server instances.
Step 7. Click on Add button to add New Health Probes for your Load Balancer & specify the Health Probes details as per your requirements.
Note : Specify the Name of health probe as per your requirements and leave the following settings default & then click on Ok.
Step 8. Now under the settings click on Backend pools option & then click on Add button to Add virtual machines in your Load Balancer.
Step 9. Specify the new name for your backend pool & click on Add a virtual machine option to add a virtual machine in your load balancer.Now click on Availability set & choose a availability set in which your virtual machine is configured that you want to add.
Step 10. Now click on Virtual Machines option & choose virtual machines you want to add in Load balancer.As for now i am going to select all three virtual machines.After that click on select button .
Step 11. Now you can see all virtual machines are successfully added in backend pool.
Step 12. Now under the settings click on Load balancing rules option & then click on Add button to add new Load balancing rules.
Step 13. Specify any Name for your Load balancing rule & leave the following settings default,After that click on OK.
Step 14. As you can see Load balancing rule is created successfully.
Step 15. Now we can check our Load Balancer by distributing the Traffic on all Virtual Machines.For this we have installed apache2 webserver on machine 1 and lighttpd on machine 2 & php 7.0 on machine 3.
Step 16. Under the Essentials copy the public IP address of your Load balancer & run it through the browser.After Running IP Through web page refreshing the page repeatedly in return which produces the load on webserver and load balancer will help us to distribute the load over the machines.