Windows Network Load Balancing (NLB) is a built-in feature of Windows Server that distributes incoming network traffic across multiple servers without requiring additional hardware or software. For IIS web farms, NLB provides a cost-effective way to scale web applications and improve availability.
NLB Cluster Configuration
Each node in an NLB cluster must have at least two network interfaces: one for cluster traffic and one for management. Configure the cluster with a virtual IP address that clients use to access the web application. NLB supports unicast and multicast operation modes; multicast mode is generally preferred as it does not require a second NIC for inter-node communication.
Session affinity, called single affinity in NLB terminology, directs all requests from a single client IP to the same cluster node. This is important for applications that store session state locally. However, for true scalability, configure your application to use an external session state provider such as SQL Server session state or a distributed cache.
Configure port rules to define which traffic the cluster handles. Use filtering modes to distribute specific ports across specific nodes, enabling scenarios where some nodes handle web traffic while others process background tasks. Monitor cluster health using the NLB Manager console and configure Windows Event Log alerts for convergence events that indicate node failures or recoveries.