How Does Network Load Balancing Algorithm Works Internally
SUMMARYThis article explains how NLB algorithm works internally form a technical point of view. MORE INFORMATIONGeneral rule for a NLB Cluster which applies to each host in the cluster: 1. All port rules (range) defined in a host cluster must be unique across the cluster. 2. Host priority (Default Host) must be unique across the cluster. 3. Cluster mode must be unique across the cluster: either Unicast or Multicast. A cluster node maintains a statistical mapping of port rules with associated Virtual IP of the cluster. I will give an port rule example and then explain how it works in cluster when an incoming TCP/IP packet arrives to cluster hosts. I have configured the following port rule at one of the cluster host: Host 1 Port Range: 80 to 80 Protocol: TCP Host ID: 1 Filtering Mode: Multiple, Load Weight: 70 Virtual IP 10.0.0.1 Host 2 Port Range: 80 to 80 Protocol: TCP Host ID: 2 Filtering Mode: Multiple, Load Weight: 30 Virtual IP 10.0.0.1 After configuring port rules on cluster hosts, all the hosts simultaneously invoke a process called “Convergence Process”. The main objective of this process to check any inconsistency in the rule defined for that cluster and also designates a host as the Default Host in case of a host fails to converge successfully. After convergence process has finished all the hosts will maintain a list of statistical mappings in the local computer as portrayed below: Statistical mapping on Host 1 Counter = 1 Host Name Port Range Protocol Host ID Filtering Mode Load Weight Virtual IP Flag Host 1 80 To 80 TCP 1 Multiple 70 10.0.0.1 1 Host 2 80 To 80 TCP 2 Multiple 30 10.0.0.1 1 Statistical mapping on Host 2 Counter = 1 Host Name Port Range Protocol Host ID Filtering Mode Load Weight Virtual IP Flag Host 2 80 To 80 TCP 2 Multiple 30 10.0.0.1 1 Host 1 80 To 80 TCP 1 Multiple 70 10.0.0.1 1 Note: These two hosts are running IIS to host a company web site called CSC.com and this site is mapped to 10.0.0.1 virtual IP Address. How a host does this internally when a client sends traffic for configured port rule Let’s take an example: A client running Windows 2000 or XP open up a browser and type the www.csc.com.
Statistical mapping on Host 1 after serving client Counter = 2 Host Name Port Range Protocol Host ID Filtering Mode Load Weight Virtual IP Flag Host 2 80 To 80 TCP 2 Multiple 30 10.0.0.1 1 Host 1 80 To 80 TCP 1 Multiple 70 10.0.0.1 2 You notice that Flag value has been incremented by 1 to make sure this host doesn’t receive the next traffic for the configured port rules. This host will service the next traffic only when the Host 2 has served the second request after Host 1. Please note: There are other things a host consider when receiving the incoming traffic. For example, checking Filtering Mode if configured for a single host or disabled for the configured port rules, Client Affinity, multiple Virtual IP Addresses in a single cluster, Host Priority ID (which is different from Host ID), Mode of the Host (Unicast, Multicast and IGMP), Layer 2 and Layer 3 switch. APPLIES TO
COMMUNITY SOLUTIONS CONTENT DISCLAIMERMICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES. | Article Translations
|


Back to the top
