How to create Load balancer in azure

Table of Contents

  1. Azure Load Balancer
  2. How to Create Azure Load Balancer
  3. Creation of Backend Pool
  4. Creation of Health Probe
  5. Creation of Load Balancing Rule
  6. Video Tutorial

Azure load balancer

Load Balancing provides a high level of availability and scale by spreading incoming requests across multiple virtual machines.

How to create azure load balancer

The first step is to log into the Azure portal using the user’s credentials. The option called ‘Load Balancer’ located on the top of the screen along with the rest of the services offered by Azure must be selected.

If there are no-load balancers yet, it can be created anew by clicking on the option that reads ‘Create Load Balancer’ located at the bottom of the page.

Figure-1

Information pertaining to the Project Details will be required to be filled in at this stage which consists of sections such as the Subscription type and Resource Group. Instance Details will also be required to be filled in which consists of sections such as Name, Region, Type (Internal / Public) and SKU (Basic / Standard).

Public IP Address consists of subsections such as Public IP Address that can either be created anew or use the existing one, Public IP Address Name, Public IP Address SKU, Assignment (Dynamic / Static), Availability Zone and the option to add a Public IPv6 Address or not.

FIgure-2

The next step is to Review the information filled in, and once everything is exactly the way it should be, the user may proceed to Create the new load balancer by clicking on the option ‘Create’ located at the bottom of the screen.

It should be noted that the time taken to create the load balancer and Public IP Address will be quite significant. Once the validation has been approved, the same will reflect on the load balancer page.

The next step is to go back to the page where the list of services offered by Azure can be seen and the option ‘Resource Group’ must be selected. The load balancer resource group that had been created when creating the new load balancer will be located in the archives. Both the Public IP Address and the load balancer would have been created successfully and would be reflected as well.

There are various settings that can be opted for in the load balancer page which are Backend Pools, Health Probes and Load Balancing Rules etc.

Creation of backend pool

A Backend Pool is used to distribute the traffic to the virtual machines. The backend address pool contains IP address of the VM that is connected to the load balancer. To create a backend pool the plus symbol located at the top left hand corner of the screen must be selected. The name of the backend pool must be decided as well as the IP version which can either be IPv4 or IPv6.

The virtual network and virtual machine that the user desires to add into the backend pool is also done in this step. There is usually a warning given here signifying the importance of making sure that the virtual machine is in the same location as the load balancer, has a standard public IP address and is not associated with other backend pools. The deployment of the backend pool will be approved once it satisfies all the requirements.

Figure-3

Creation of health probe

The Health Probe allows the load balancer to monitor the status of the app. It can be used to either dynamically add or remove the virtual machine from the load balancer rotation based on the responses of the health check. The backend can be monitored and based on the health data, there is a choice to either add or remove the backend from the load balancer. The following lists out the information that will need to be filled out when creating a health probe

  1. Name – Name of the health probe.
  2. Protocol
  3. Port
  4. Path
  5. Interval – The time given for which the backend will be checked along with the health of the backend.
  6. Unhealthy Threshold

The health probe is now created and can be seen on the health probe page accordingly. Once this has been created successfully, it is now time to create the Load Balancing Rule.

Creation of load balancing rule

A Load Balancing Rule is used to define how traffic is distributed to the virtual machine. The front end IP configuration is defined for the incoming traffic and backend IP pool to retrieve the traffic. To add a load balancing rule, the following is the list of information that will be required to be filled in by the user –

  1. Name – Name of the load balancing rule.
  2. IP Version – The option of choosing between IPv4 and IPv6.
  3. Front End IP Address
  4. Protocol – The options available are TCP / UCP.
  5. Port
  6. Backend Port
  7. Backend Pool
  8. Health Probe
  9. Session Persistence – The options available are Client IP / Client IP and Protocol. It specifies the traffic from a client should be handled by the same virtual machine in the backend pool for the duration of a session.
  10. Idle Timeout – It is measured in minutes.
  11. TCP Reset – Disabled / Enabled
  12. Floating IP (Direct Server Return) – Disabled / Enabled

The final step is to click on the ‘Create’ button located at the bottom of the screen and the load balancer rule will be created successfully. Now the user will be able to create a virtual network and a virtual machine and assign them to this backend pool and load balancer.

FIgure-4

Video Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *