Configure the distribution mode for Azure Load Balancer

Azure Load Balancer supports two distribution modes for distributing traffic to your applications:

  • Hash-based
  • Source IP affinity

In this article, you learn how to configure the distribution mode for your Azure Load Balancer.

Configure distribution mode


You can change the configuration of the distribution mode by modifying the load-balancing rule in the portal.

  1. Sign in to the Azure portal and locate the resource group containing the load balancer you wish to change by clicking on Resource Groups.
  2. In the load balancer overview screen, select Load-balancing rules under Settings.
  3. In the load-balancing rules screen, select the load-balancing rule that you wish to change the distribution mode.
  4. Under the rule, the distribution mode is changed by changing the Session persistence drop-down box.

The following options are available:

  • None (hash-based) - Specifies that successive requests from the same client may be handled by any virtual machine.
  • Client IP (source IP affinity two-tuple) - Specifies that successive requests from the same client IP address will be handled by the same virtual machine.
  • Client IP and protocol (source IP affinity three-tuple) - Specifies that successive requests from the same client IP address and protocol combination will be handled by the same virtual machine.
  1. Choose the distribution mode and then select Save.

Change session persistence on load balancer rule.

Next steps