You are currently viewing Azure Load Balancer – Create public load balancer

Azure Load Balancer – Create public load balancer

In this post, let’s try to create a public load balancer. This would help to understand few concepts like health probe, backend pools, load balancer front end etc. In future posts, we will try to load balance the virtual machines.

Prerequisite

You would need to have an Azure account with an active subscription.  If you do not have it yet, you can create one for free. And then sign in to the Azure portal.

Refer Azure Load Balancer – Create availability set for creating virtual network and two virtual machines within an availability set.

Create load balancer

To create a new public load balancer, search Load Balancer in top menu search box and then select Load Balancers from the search results. It would open the list showing all existing load balancers. Then click on Add to create new one.

On the create new load balancer, provide below inputs:

  • Subscription, a valid Azure subscription
  • Resource Group, the logical container for load balancer
  • Name, the name for load balancer resource
  • Region, the geographical region where the resource should be created
  • Type, either Internal or Public, Select Public
  • SKU, the pricing tier. Standard tier is recommended for production. For this demo, select Basic
  • Public IP address, create a new IP address
  • Public IP address name, name for the public IP address name
  • Public IP address SKU, the pricing tier for public IP address
  • IP address assignment, keep this to default, i.e. dynamic

Then, click on Review + Create button. If all inputs are valid, Create button to create the resource.

Azure Portal: Create public load balancer

Once the load balancer is created, some other resources should also be created. Those resources are:

  • Load balancer settings for a backend address pool.
  • A health probe.
  • A load balancer rule.

Create a backend pool

Now, navigate to the newly created load balancer. Select Backend pools Under Settings, then select Add.

Azure Portal: Backend pools under Settings

On the Add a backend pool page, provide below inputs:

  • Name, provide vm-backend, as the name for your backend pool
  • Virtual network, select the demo-vnet that you already have created (refer Prerequisite section).
  • IP version, select IP v4
  • Associated to, select virtual machines
  • Virtual Machines, add the two virtual machines demo-vm1 and demo-vm2 which are part of demo-vnet
Azure Portal: Add backend pool in public load balancer

Once these inputs are provided, then click on Add button. This would add the backend.

Create a health probe

The load balancer monitors the status of your app with a health probe.

The health probe adds or removes VMs from the load balancer based on their response to health checks.

We are going to create a health probe, which sends a health check message after every 15 seconds, and if there are two consecutive health checks fail.

Azure Portal: Add health probe in public load balancer

In next post, we will create the rule for load balancer. I hope you found this information useful. Let me know your thoughts.

Leave a Reply Cancel reply