12. Setting stickiness and affinity
Some web applications hold information in memory and always require you to return to the same web server in a cluster to keep the same session. These applications require "sticky" load balancing, where once a client starts talking to a particular application server in the cluster, it returns there. It is possible to use a characteristic called affinity to set load balancing to be sticky in this way. Only Enterprise Manager needs to be setup to be "sticky" in Perception 5.4.
The section below describes common ways to set up stickiness and affinity on Windows Server 2008. If you are using a different operating system, please refer to your documentation on how to deal with "stickiness," "persistence," or "affinity."
- Open the NLB Manager (click Start | Administrative Tools | Network Load Balancing Manager)
- Connect to the cluster
- Right-click the cluster, and then click Cluster Properties
- Click the Port Rules tab, and then click Add
- Cluster IP address, which is the virtual IP address that you want this rule to apply to. Enter a specific virtual IP address to create a virtual cluster, or check All to apply the rule to all virtual IP addresses.
- Port range - 0 to 65535
- Protocols - Both
- Filtering mode. In some circumstances, particularly if your participants/administrators are using the internet rather than the intranet, you will want to use Class C instead of Single. Single affinity gives better performance but if your participants and administrators are likely to be routed via proxy servers or in other ways that are likely to find Class C-relevant, you should use this.
- Affinity - Single
- Load weight (as appropriate)
- Click OK. This applies the changes and restarts the load-balancing service.