Nlb

20
Windows 2000 Network Windows 2000 Network Load Balancing Load Balancing Troy Reavis Jr. Troy Reavis Jr. Support Engineer Support Engineer Product Support Services Product Support Services Microsoft Corporation Microsoft Corporation

Transcript of Nlb

Page 1: Nlb

Windows 2000 Network Windows 2000 Network Load BalancingLoad Balancing

Troy Reavis Jr.Troy Reavis Jr.Support EngineerSupport EngineerProduct Support ServicesProduct Support ServicesMicrosoft CorporationMicrosoft Corporation

Page 2: Nlb

2

What Does Network Load Balancing What Does Network Load Balancing (NLB) Add to My Business?(NLB) Add to My Business?

AvailabilityAvailability HeartbeatHeartbeat

Load Balancing/PerformanceLoad Balancing/Performance AlgorithmAlgorithm ConvergenceConvergence

ScalabilityScalability Quickly add nodeQuickly add node

Page 3: Nlb

3

What Is the Difference Between What Is the Difference Between Microsoft Cluster Server and NLB?Microsoft Cluster Server and NLB?

Page 4: Nlb

4

Microsoft Cluster ServerMicrosoft Cluster Server

Multiple, distinct applicationsMultiple, distinct applications Maximum of two systems/nodesMaximum of two systems/nodes Example uses: SQL, databases, and so onExample uses: SQL, databases, and so on

Page 5: Nlb

5

Network Load Balancing Network Load Balancing

Balance IP traffic across nodesBalance IP traffic across nodes TCP/IP and related protocols onlyTCP/IP and related protocols only Maximum of 32 systems/nodesMaximum of 32 systems/nodes Example uses: HTTP, FTP, and so onExample uses: HTTP, FTP, and so on

Page 6: Nlb

6

Requirements for NLBRequirements for NLB

WindowsWindows®® 2000 Advanced Server or 2000 Advanced Server or Windows 2000 Datacenter ServerWindows 2000 Datacenter Server

1 MB of disk space and 4 MB of RAM1 MB of disk space and 4 MB of RAM TCP/IP ProtocolTCP/IP Protocol FDDI, Ethernet LAN, or Gigabit EthernetFDDI, Ethernet LAN, or Gigabit Ethernet Hosts must reside on same subnetHosts must reside on same subnet Only enabled on one NIC per machineOnly enabled on one NIC per machine

Page 7: Nlb

7

How Does NLB Load Balance?How Does NLB Load Balance?

NLB resides between NIC driver TCP/IPNLB resides between NIC driver TCP/IP Each packet coming in goes to every nodeEach packet coming in goes to every node Nodes will drop packets according to rules Nodes will drop packets according to rules

and algorithmand algorithm

Page 8: Nlb

8

Unicast ModeUnicast Mode

Single MAC address usedSingle MAC address used MAC used is virtual/shared MACMAC used is virtual/shared MAC Always starts with 02-bfAlways starts with 02-bf Can’t communicate with other nodes on NIC Can’t communicate with other nodes on NIC

with NLB installedwith NLB installed Default settingDefault setting

Page 9: Nlb

9

Multicast ModeMulticast Mode

Uses both virtual/shared MAC and dedicated Uses both virtual/shared MAC and dedicated MACMAC

Virtual MAC always starts with 03-bfVirtual MAC always starts with 03-bf Ability to communicate with other nodes on Ability to communicate with other nodes on

NIC that NLB is installedNIC that NLB is installed

Page 10: Nlb

10

Layer 2 vs. Layer 3 SwitchesLayer 2 vs. Layer 3 Switches

Layer 2 switches work at MAC address levelLayer 2 switches work at MAC address level Registry changes to keep Layer 2 switches Registry changes to keep Layer 2 switches

from learning shared MAC addressfrom learning shared MAC address Layer 3 switches work at IP address levelLayer 3 switches work at IP address level Because NLB relies on shared IP Layer 3 Because NLB relies on shared IP Layer 3

won’t workwon’t work

Page 11: Nlb

11

ConvergenceConvergence

Distributed mechanism for determining Distributed mechanism for determining cluster statuscluster status

Also for adjusting load distributionAlso for adjusting load distribution Convergence begins when:Convergence begins when:

Specified number of heartbeats are missedSpecified number of heartbeats are missed New node is addedNew node is added

Takes approximately three secondsTakes approximately three seconds

Page 12: Nlb

12

HeartbeatHeartbeat

Each host broadcasts a 1.5 KB heartbeat Each host broadcasts a 1.5 KB heartbeat packet once a second (configurable)packet once a second (configurable)

If one node misses five heartbeats If one node misses five heartbeats convergence starts for remaining nodes convergence starts for remaining nodes (configurable)(configurable)

Page 13: Nlb

13

AffinityAffinity

AffinityAffinity Load Balancing Load Balancing GranularityGranularity

Hashed onHashed on Used forUsed for

NoneNone Individual TCP Individual TCP connectionsconnections

Source IP Source IP address and portaddress and port

Most applicationsMost applications

SingleSingle All connections All connections originating from the originating from the

same sourcesame source

Source IP Source IP addressaddress

Session support, SSL, and Session support, SSL, and multi-connection protocols multi-connection protocols

(i.e., FTP, PPTP, (i.e., FTP, PPTP, and so on)and so on)

Class CClass C All connections All connections originating from the originating from the

same class C address same class C address spacespace

Source IP Source IP address with address with class C mask class C mask applied to itapplied to it

Properly handling sessions Properly handling sessions for users residing behind for users residing behind

scaling proxy arraysscaling proxy arrays

Page 14: Nlb

14

NLB Driver InterfaceNLB Driver Interface

Page 15: Nlb

15

Cluster Parameters SetupCluster Parameters Setup

Primary IP address is cluster-Primary IP address is cluster-wide virtual IP addresswide virtual IP address

Subnet mask is mask for Subnet mask is mask for primary IPprimary IP

Full Internet name should Full Internet name should resolve to primary IPresolve to primary IP

Network address is MAC Network address is MAC used for all nodesused for all nodes

Page 16: Nlb

16

Host Parameters SetupHost Parameters Setup

Priority ranks host in Priority ranks host in clustercluster

Initial forces host to join Initial forces host to join cluster at bootcluster at boot

Dedicated IP is IP other Dedicated IP is IP other than virtual IP for clusterthan virtual IP for cluster

Subnet mask is mask for Subnet mask is mask for dedicated IPdedicated IP

Page 17: Nlb

17

Port Rules SetupPort Rules Setup

Describes how NLB filters Describes how NLB filters traffic for specific portstraffic for specific ports

Three possible filtering Three possible filtering modes:modes: Single hostSingle host Multiple hostsMultiple hosts DisabledDisabled

Default is a wide-open port Default is a wide-open port rulerule

Page 18: Nlb

18

Wlbs.exe Command Line-Driven Wlbs.exe Command Line-Driven ToolsTools Help – Displays help informationHelp – Displays help information Setup – Runs nlb setup dialogSetup – Runs nlb setup dialog Reload – Reload nlb parametersReload – Reload nlb parameters Start/Stop – Affects nlb operation to hostStart/Stop – Affects nlb operation to host Enable/Disable x – Affects traffic to port x on Enable/Disable x – Affects traffic to port x on

hosthost Query – Reports cluster statusQuery – Reports cluster status Display – Displays extensive status Display – Displays extensive status

information, information, parameters, and event log parameters, and event log messagesmessages

Page 19: Nlb

19

NLB in the Registry (Q193601)NLB in the Registry (Q193601)

HKEY_LOCAL_MACHINE\System\CCS\HKEY_LOCAL_MACHINE\System\CCS\Svcs\WLBS\ParametersSvcs\WLBS\Parameters(Note that the registry key name has been wrapped for readability.)(Note that the registry key name has been wrapped for readability.)

AliveMsgPeriod – period between “I am alive” AliveMsgPeriod – period between “I am alive” messages broadcast by each hostmessages broadcast by each host

AliveMsgTolerance – number of periods to AliveMsgTolerance – number of periods to wait before declaring a host deadwait before declaring a host dead

MaskSourceMAC - Set to 1 (default) if running MaskSourceMAC - Set to 1 (default) if running on a switch in unicast mode, set to 0 if on a switch in unicast mode, set to 0 if running on a hub uplinked to a switchrunning on a hub uplinked to a switch

Page 20: Nlb

20

Thank you for joining us for today’s Microsoft Thank you for joining us for today’s Microsoft Support WebCast.Support WebCast.

For information on all upcoming Support WebCasts For information on all upcoming Support WebCasts and access to the archived content (streaming and access to the archived content (streaming media, PowerPoint slides, and transcripts), please media, PowerPoint slides, and transcripts), please visit:visit:

http://support.microsoft.com/WebCastshttp://support.microsoft.com/WebCasts//

We sincerely appreciate your feedback. Please send We sincerely appreciate your feedback. Please send any comments or suggestions regarding the Support any comments or suggestions regarding the Support WebCasts to WebCasts to [email protected]@microsoft.com. Include . Include “Support WebCasts” in the subject line.“Support WebCasts” in the subject line.