LOB (line of business) applications are often deployed with a Load Balancer that distributes incoming traffic to healthy virtual machines or cloud services. When deploying an application, that uses the HTML5-based Web.TextControl, picking the right distribution algorithm is important.

The default setting for session persistence of an Azure Load Balancing Rule is None. The distribution algorithm uses a 5-tuple (source IP, source port, destination IP, destination port, protocol type) hash to route the traffic to servers in the Backend Pool. It provides stickiness only within the transport session. This distribution setup cannot be used for applications that use Web.TextControl MVC or Web Forms.

Using an Azure Load Balancer with Web.TextControl

Azure provides an additional distribution mode called Source IP Affinity (also known as session affinity or client IP affinity). Azure Load Balancer can be configured to use a 2-tuple (source IP, destination IP) or 3-tuple (source IP, destination IP, protocol) to route traffic to the available servers. By using Source IP Affinity, connections initiated from the same client are routed always to the same endpoint.

Using an Azure Load Balancer with Web.TextControl

The same distribution mode is required when using a separate application server that runs the TX Text Control Service as described in this article:

Using an Azure Load Balancer with Web.TextControl

When creating the Azure deployment, it is very important that the virtual machines of the load balancer Backend pool are created in the same Availability Set.

Using an Azure Load Balancer with Web.TextControl

In order to specify the Source IP Affinity distribution mode, select Client IP from the Session Persistence drop-down in the load balancing rule settings:

Using an Azure Load Balancer with Web.TextControl

None means 5-tupel, Client IP is 2-tupel and Client IP and protocol is the 3-tupel distribution algorithm.