You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/load-balancer/load-balancer-distribution-mode.md
+22-13Lines changed: 22 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Configure Azure Load Balancer distribution mode
3
3
titlesuffix: Azure Load Balancer
4
-
description: How to configure the distribution mode for Azure Load Balancer to support source IP affinity.
4
+
description: In this article, get started configuring the distribution mode for Azure Load Balancer to support source IP affinity.
5
5
services: load-balancer
6
6
documentationcenter: na
7
7
author: asudbring
@@ -11,7 +11,7 @@ ms.topic: article
11
11
ms.custom: seodec18
12
12
ms.tgt_pltfrm: na
13
13
ms.workload: infrastructure-services
14
-
ms.date: 09/25/2017
14
+
ms.date: 11/19/2019
15
15
ms.author: allensu
16
16
---
17
17
@@ -21,24 +21,33 @@ ms.author: allensu
21
21
22
22
## Hash-based distribution mode
23
23
24
-
The default distribution mode for Azure Load Balancer is a 5-tuple hash. The tuple is composed of the source IP, source port, destination IP, destination port, and protocol type. The hash is used to map traffic to the available servers and the algorithm provides stickiness only within a transport session. Packets that are in the same session are directed to the same datacenter IP (DIP) instance behind the load-balanced endpoint. When the client starts a new session from the same source IP, the source port changes and causes the traffic to go to a different DIP endpoint.
24
+
The default distribution mode for Azure Load Balancer is a five-tuple hash.
25
25
26
-

26
+
The tuple is composed of the:
27
+
***Source IP**
28
+
***Source port**
29
+
***Destination IP**
30
+
***Destination port**
31
+
***Protocol type**
32
+
33
+
The hash is used to map traffic to the available servers. The algorithm provides stickiness only within a transport session. Packets that are in the same session are directed to the same datacenter IP behind the load-balanced endpoint. When the client starts a new session from the same source IP, the source port changes and causes the traffic to go to a different datacenter endpoint.
34
+
35
+

27
36
28
37
## Source IP affinity mode
29
38
30
-
Load Balancer can also be configured by using the source IP affinity distribution mode. This distribution mode is also known as session affinity or client IP affinity. The mode uses a 2-tuple (source IP and destination IP) or 3-tuple (source IP, destination IP, and protocol type) hash to map traffic to the available servers. By using source IP affinity, connections that are started from the same client computer go to the same DIP endpoint.
39
+
The load balancer can also be configured by using the source IP affinity distribution mode. This distribution mode is also known as session affinity or client IP affinity. The mode uses a two-tuple (source IP and destination IP) or three-tuple (source IP, destination IP, and protocol type) hash to map traffic to the available servers. By using source IP affinity, connections that are started from the same client computer go to the same datacenter endpoint.
31
40
32
-
The following figure illustrates a 2-tuple configuration. Notice how the 2-tuple runs through the load balancer to virtual machine 1 (VM1). VM1 is then backed up by VM2 and VM3.
41
+
The following figure illustrates a two-tuple configuration. Notice how the two-tuple runs through the load balancer to virtual machine 1 (VM1). VM1 is then backed up by VM2 and VM3.
33
42
34
-

43
+

35
44
36
45
Source IP affinity mode solves an incompatibility between Azure Load Balancer and Remote Desktop Gateway (RD Gateway). By using this mode, you can build an RD Gateway farm in a single cloud service.
37
46
38
47
Another use case scenario is media upload. The data upload happens through UDP, but the control plane is achieved through TCP:
39
48
40
49
* A client starts a TCP session to the load-balanced public address and is directed to a specific DIP. The channel is left active to monitor the connection health.
41
-
* A new UDP session from the same client computer is initiated to the same load-balanced public endpoint. The connection is directed to the same DIP endpoint as the previous TCP connection. The media upload can be executed at high throughput while maintaining a control channel through TCP.
50
+
* A new UDP session from the same client computer is started to the same load-balanced public endpoint. The connection is directed to the same DIP endpoint as the previous TCP connection. The media upload can be executed at high throughput while maintaining a control channel through TCP.
42
51
43
52
> [!NOTE]
44
53
> When a load-balanced set changes by removing or adding a virtual machine, the distribution of client requests is recomputed. You can't depend on new connections from existing clients to end up at the same server. Additionally, using source IP affinity distribution mode can cause an unequal distribution of traffic. Clients that run behind proxies might be seen as one unique client application.
@@ -50,8 +59,8 @@ Another use case scenario is media upload. The data upload happens through UDP,
50
59
You can change the configuration of the distribution mode by modifying the load-balancing rule in the portal.
51
60
52
61
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**.
53
-
2. In the load balancer overview blade, click on **Loadbalancing rules** under **Settings**.
54
-
3. In the loadbalancing rules blade, click on the loadbalancing rule that you wish to change the distribution mode.
62
+
2. In the load balancer overview screen, click on **Load-balancing rules** under **Settings**.
63
+
3. In the load-balancing rules screen, click on the load-balancing rule that you wish to change the distribution mode.
55
64
4. Under the rule, the distribution mode is changed by changing the **Session persistence** drop down box. The following options are available:
56
65
57
66
***None (hash-based)** - Specifies that successive requests from the same client may be handled by any virtual machine.
@@ -76,7 +85,7 @@ For classic virtual machines, use Azure PowerShell to change the distribution se
Set the value of the `LoadBalancerDistribution` element for the desired amount of load balancing. Specify sourceIP for 2-tuple (source IP and destination IP) load balancing. Specify sourceIPProtocol for 3-tuple (source IP, destination IP, and protocol type) load balancing. Specify none for the default behavior of 5-tuple load balancing.
88
+
Set the value of the `LoadBalancerDistribution` element for the amount of load balancing required. Specify sourceIP for two-tuple (source IP and destination IP) load balancing. Specify sourceIPProtocol for three-tuple (source IP, destination IP, and protocol type) load balancing. Specify none for the default behavior of five-tuple load balancing.
80
89
81
90
Retrieve an endpoint load balancer distribution mode configuration by using these settings:
82
91
@@ -100,7 +109,7 @@ Retrieve an endpoint load balancer distribution mode configuration by using thes
100
109
IdleTimeoutInMinutes : 15
101
110
LoadBalancerDistribution : sourceIP
102
111
103
-
When the `LoadBalancerDistribution` element isn't present, Azure Load Balancer uses the default 5-tuple algorithm.
112
+
When the `LoadBalancerDistribution` element isn't present, Azure Load Balancer uses the default five-tuple algorithm.
104
113
105
114
### Configure distribution mode on load-balanced endpoint set
106
115
@@ -165,7 +174,7 @@ Use the Azure classic deployment model to change an existing deployment configur
165
174
</InputEndpoint>
166
175
</LoadBalancedEndpointList>
167
176
168
-
As previously described, set the `LoadBalancerDistribution` element to sourceIP for 2-tuple affinity, sourceIPProtocol for 3-tuple affinity, or none for no affinity (5-tuple affinity).
177
+
As previously described, set the `LoadBalancerDistribution` element to sourceIP for two-tuple affinity, sourceIPProtocol for three-tuple affinity, or none for no affinity (five-tuple affinity).
0 commit comments