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

Azure Load Balancer – Create load balancer rule

In the current series of posts, we are trying to setup a public load balancer. We already have created availability set, virtual network, virtual machines and load balancer. Please refer below posts in case you want to go through them:

We have created a public load balancer. The backend pool and health probe has also been configured. Next step is to configure rules for load balancer.

What is a load balancing rule ?

A load balancing rule decides how the traffic would be load balanced and distributed to load balanced resources in the backend pool. A load-balancing rule maps a given frontend IP configuration and port to multiple backend IP addresses and ports.

For example, use a load-balancing rule for port 80 to route traffic from your frontend IP to port 80 of your backend instances.

Configure the load balancing rule

Navigate to the load balancer demo-lb, then select the Load balancing rules under Settings. Then click on Add.

On the new panel, you are required to provide below inputs:

  • Name, the name of rule
  • IP Version, lets keep it to the default value, IPv4
  • Frontend IP address, the name that was given to the public IP address of load balancer
  • Protocol, select TCP
  • Port, the port on frontend for which this rule is applicable. Let it be 80.
  • Backend port, the port number where traffic should be forwarded in the backend resource. Let this be 80 too.
  • Backend pool, provide the name of backend pool that we already have created for the VMs.
  • Health probe, provide the name of health probe we already have created.
  • Session persistence, if you want to persist the sessions, then this setting is useful. For this demo, let it be set to None.
  • Idle timeout (minutes), the time after which the session would be over. Let it be the default value.
  • Floating IP, set it to default value i.e. Disabled.

After setting those inputs, click on OK to create the rule.

Azure Portal: Add a load balancing rule

So, the load balancer rule is created. Next step is to verify the setup. Let’s do it in the next post of the series.

I hope you found this information useful. Let me know your thoughts.

Leave a ReplyCancel reply