Introduction to Azure Load Balancer
Microsoft Azure offers a load balancing service to distribute the load of inbound network traffics across different machines or virtual servers at the backend. A load balancer helps in maintaining high availability and makes hardware and software resilient to failures. Azure works as a transport layer in the Open Systems Interconnection (OSI) model. The load balancer does not direct the traffic to failed machines.
There are two types of configuration modes are used in Azure Load Balancer:
- External – Public load balancing
- Internal – Internal load balancing
Working of Azure Load Balancer
Microsoft Azure offers load balancing to the network in two modes so that inbound traffic flows based on the configured rules of load balancing. Load balancer helps in scale our application and create high available service here is the working of two modes in Azure load balancer:
1. Public (External) load balancer
A public Load balancer provides the outbound connection to the virtual machines (VMs) from the pool of backend virtual networks. For these outbound connections, all the private IP addresses are converted to the Public IP addresses so that each load balancer gets assigned with one Public IP address to accept the request coming from the internet. When load balancer gets called from the client apps then based on the load balancer configuration inbound traffic is distributed among Virtual Machines.
2. Private (Internal) load balancer
Private load balancers used if we need private IPs at the frontend. This load balancer uses a private IP address to call and all traffic is routed to the inside of the virtual network to the requested virtual machines. The internal load balancer uses source IP, source port, destination IP, destination port, and the protocol type to balance the internet traffic in virtual machines. It uses a hash function to distribute this load. If the source to destination IP connection is lost then the hash function forms a new connection with separate endpoints.
Below figure shows the Public and Private load balancer
How to Create an Azure Load Balancer?
1. Log in to the Azure Portal using the valid username and password:
2. Select the Create a resource from the Home page of the portal.
3. Now from the Search the Marketplace search for the Load Balancer in the search box:
You will be redirected to the Load Balancer page as below:
4. Select Create button from the load balancer screen:
5. User will be redirected to the below page which will ask for the configuration details:
6. Enter the below information on the Create load balancer page:
Information is entered in the Basic tab:
7. Now click on the Review + create button from the page:
The page will start the running validation about the configuration, If details is correct it will show validation passed message:
8. Now click on the Create button from the page and it will start deploying the resources.
9. Once the deployment is completed it will show the recently created load balancer:
10. Now select Go to resource from the page and select Backend pools from the right pane of the page:
11. User can add the backend pools detail her by selecting add button as per the requirement:
Features of Azure Load Balancer
Below are mentioned the features:
- Load Balancer: Azure load balancer provides users an option to configure the load balancer based on the role. Based on internal or external load balancer mode internet traffic is balanced on the Azure virtual machines.
- Availability Sets: Load balancer distributes resources of azure within and across virtual machines and zones.
- Port Forwarding: It provides features to port forward traffic to any particular virtual server by using public IP address and port.
- Application agnostic and transparent: This feature helps the user to direct the traffic based on URL or multi-site hosting as load balancer does not interact directly with TCP/IP or UDP also TCP and UDP flow on all the ports simultaneously with the help of HA(High Availability) ports.
- Automatic reconfiguration: The load balancer has the feature to reconfigure itself if we are scaling up or down the machines in the backend pool.
- Health probes: Load balancer has a feature to stop traffic flow to the failed machines which in turn helps to recognize failed virtual machines and this is done using a health probe. Users can configure a health probe to check on the health status of servers at the backend
- Outbound connection: Load balancer offers outbound connectivity to public or private IP addresses of azure virtual machines inside virtual networks.
Microsoft Azure offers the data load balance service to maintain the high availability and scalability of the virtual machines and offers automatic reconfiguration of the system so that users have less effort in the maintenance of the azure with these services. Whatever users do on the internet we need to balance the load and it is done using these services. Here we have also learned how to create an azure load balance and configure the same based on roles.
This is a guide Azure Load Balancer. Here we discuss How to Create an Azure Load Balancer along with the working and Features. You may also look at the following articles to learn more –