Installation and Upgrade > Advanced Deployment Considerations > Installing and Configuring a Cluster Windchill Environment > Server Cluster Configuration Overview > Configuring a Typical Server Cluster > Configuring Affinity
  
Configuring Affinity
End-users typically access a Windchill cluster through a load balancing router. The load balancing router dispatches their requests across several machines in an attempt to distribute the workload evenly. However, configuring Affinity within the load balancer can take advantage of the servlet engine session cache and processing multi-step operations. This configuration directs subsequent related requests to the same servlet engine and Method Server for processing.
The load balancing router must load balance any and all TCP traffic and IP traffic that is to be allowed across this boundary. Thus, if you limit the traffic to HTTP or HTTPS (tunneling RMI over HTTP or HTTPS, etc), then you only need to have a load balancing router that handles HTTP or HTTPS. If you allow other TCP communication and IP communication across this boundary, such as direct RMI traffic, then it too must be load balanced.
The method servers have no additional affinity requirements when tunneling RMI over HTTP or HTTPS. However, the load balancer must still properly enforce affinity for HTTP and HTTPS traffic which will include tunneled traffic. If direct RMI ports are load balanced by the routers, then the load balancer must enforce affinity for these ports. Since RMI is not a protocol that can handle cookies or other tags for affinity purposes, this usually will be enforced using client host affinity over a period of time.
Windchill also has affinity requirements of its servlet engines however, and requires either client host or session affinity. Client host affinity maps all requests from a given host during a given time period to the same servlet engine JVM, thus ensuring that all session data from the host remains with that JVM. Session affinity is more precise and is the best match for what servlet engines actually require.
Whether the IP load balancing router is responsible for ensuring this affinity depends on your architecture. For example, you could have an IP load balancing router balancing between several machines, each running an Apache-based web server with mod_jk and load balancing over all servlet engines on all of the machines. If you do this correctly, then mod_jk ensures session affinity and your IP load balancer does not have to ensure any affinity. However, incoming requests are likely to be directed to an arbitrary web server for initial processing. The requests are then directed to a servlet engine on a different machine for subsequent processing.
Alternatively, you could use an Apache-based web server and mod_jk as your load balancer, having just one web server on a "load balancer" machine and having it send out requests to the servlet engines on the cluster nodes. This approach requires that all non-HTTP(S) traffic be tunneled over HTTP(S).
The easiest approach is to configure the load balancing router with host affinity for all TCP connections and IP connections. This ensures that all requests from a specific client host will, during a specific period of time, be handled by the same node of the cluster.
* 
Configurations vary widely depending on load balancing software and hardware. This set of topics only discusses configuration for the Windchill server systems.