Configuring Network Load Balancing (NLB) is an advanced task. Only an administrator who knows the topology of the network and K2 should perform the configuration. Use these steps as a guide, as your system may require additional configuration due to different hardware and software compatibilities, and the configuration of your K2 services (such as the K2 server, the SmartForms server, and APIs). You can use various software and hardware load-balancing solutions with K2. These steps are the Windows software solution, but the same principles apply to any solution.
When configuring a cluster, follow the below steps:
- Open Network Load Balancing Manager (nlbmgr.exe) (Start > All Programs > Windows Administrative Tools > Network Load Balancing Manager, or Start > Run > nlbmgr.exe).
- Add a New Cluster (right-click on Network Load Balancing Clusters and select New Cluster).
- On the Connect page, connect to the first host in the cluster and select the appropriate connection as the interface. If the server has multiple network adapters, many interfaces may be displayed. Be sure to select the appropriate network adapter from the list and click Next.
- On the Host Parameters page, select the host priority, add the host IP address and subnet mask, select the initial host state and click Next.
- On the Cluster IP Addresses page, add in any additional IP addresses that the cluster can be accessed from, and click Next.
- In the Cluster Parameters window, enter the appropriate IP address, subnet mask, full Internet name, and cluster operation mode, and click Next.
- On the Port Rules page, edit the existing rule to use the appropriate affinity. See the notes below for recommendations based on the cluster type. Click Next to continue.
- To add a second node to the cluster, right-click on the newly created cluster and select Add Host to Cluster.
- Connect to the second host, and make sure to select the appropriate interface.
Considerations
This list of considerations applies to all load balancing solutions. Specific settings may be named differently in other solutions, but the principles are the same.
- The K2 server is a stateless machine so on a K2 server cluster, no affinity is necessary per session.
- For server clusters other than the K2 server, such as for K2 sites, use a Unicast operation mode and set the affinity to Single. Ensure that the web pages retain IP affinity to the web server during the session.
- In some cases, the Network Load Balancing Manager console times out before the second node is configured. If that happens, right-click the cluster and select Refresh. You should see all the nodes in a Converged state. Make sure that your cluster is configured correctly before starting the installation.
- When using the Unicast operation, you need at least two network adapters.
- Set up the NLB configuration to allow traffic on the K2 Workflow (default of 5252) and K2 server (default of 5555) ports.
- Cookie affinity cannot be used with K2.
- Sometimes a newly created NLB cluster FQDN is not populated in DNS. You should manually add the cluster FQDN entry to the DNS for better network routing. For example, a NLB cluster named "Fubar.gotham.local" is created with IP 10.0.1.32, ensure this is added in the DNS forward lookup zone for that domain. Also add the NLB cluster name to the host file for each node in the cluster to prevent ambiguous network calls. For example, in the node’s hosts file, define the IP of "Fubar.gotham.local" as localhost.