Session Sticky of the Microsoft Azure load Balancer

Source: Internet
Author: User
Tags azure load balancer

Microsoft Azure's Load balancer is a Layer-4 load balancer. The Microsoft Azure load balancer distributes the load between a set of available servers (virtual machines) by calculating the hash function for the traffic received on a given input endpoint. The hash function is computed so that all packets from the same connection (TCP or UDP) will eventually reside on the same server. the Microsoft Azure load balancer calculates a hash function for mapping traffic to available servers with 5 information (source IP, source port, Destination IP, destination port, protocol type). The hash function We choose makes the distribution of connections to the server very random. However, depending on the traffic pattern, different connections may be mapped to the same server. (Note that the distribution of connections to the server is not polling, nor does it have a request queue, as the other articles or blogs mistakenly claim). The basic premise of a hash function is to obtain a large number of requests from different clients so that the request can be optimally distributed across servers.

Azure load Balancing currently supports three distribution modes:1, five-tuple,2, Ternary,3, two-tuple. load Balancing set on the portal defaults to a five-tuple (source IP, source port, Destination IP, destination port, protocol type) to calculate the hash value. If a two-tuple (source IP, Destination IP) Distribution mode is used, the connection from the same client will be distributed to the same server in the balanced set . Note, however, that this can cause requests to not be distributed evenly, because different client requests are allocated as the same load after the same NAT device. The ternary group uses the source IP, Destination IP, protocol to calculate the hash value. It increases the distinction of a protocol than a binary group.

For the distribution mode of modifying load balancing, please see the following:

Viewing virtual machine endpoint information,get-azurevm-servicename fuzl-name fuzlc66 | Get-azureendpoint

To set the distribution mode to Sourceipprotocol:

Set-azureloadbalancedendpoint-servicename "Fuzl"-lbsetname "tomcatlb"-protocol tcp-localport 8080-probeprotocoltcp -probeport 8080–loadbalancerdistribution "Sourceipprotocol"

Command: set-azureloadbalancedendpoint-servicename "xxxx"-lbsetname "xxxx"-protocol tcp-localport xx- Probeprotocoltcp-probeport xx–loadbalancerdistribution "SourceIP"

Reference:

https://azure.microsoft.com/en-us/blog/azure-load-balancer-new-distribution-mode/

Https://azure.microsoft.com/en-us/blog/azure-load-balancer-new-distribution-mode/?cdn=disable

Session Sticky

of the load balancer for Microsoft Azure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.