Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Support for session affinity, also known as sticky session support, allows a load balancing service to route an HTTP request back to the same node that created the HTTP session associated with that request until that node fails. You must use session affinity if you configure an asynchronous type of session replication. With asynchronous replication, the reply is returned before the HTTP session is replicated so there is always a chance that the next request using that session arrives before the replication is complete. In this case, the only way to ensure that the request is processed using the correct session data is to route the request to the node that sent the reply to the last request and originated the replication.

In Geronimo v2.2servers, users can have the same experiences as in Tomcat Web container to configure session affinity. To enable session affinity, you must modify servel.xml under <GERONIMO_HOME>/var/catalina directory and configure the <Engine> with a jvmRoute attribute value that is unique for each node in the cluster. The load balancer will return this value in the session cookie or the encoded URL returned to the browser. When a related request arrives it can use the value to route the request to the correct node. See

...

To convert this example to a multicast configuration, the DisableMCastInterceptor, StaticMemberInterceptor, and StaticMember definitions need to be removed. Also, the value for the "address" attribute for the TomcatReceiver definition should be changed to "auto".

Configuring the cluster at Enginee or Host level

...

You can configure the cluster just like you always did for a standalone Tomcat Web container, input all the clustering configuration into var/catalina/server.xml file according to your requirement in Geronimo. Both multicast and unicat are supported well. Refer to the following sample codes when you want to configure a Enginee/Host level cluster, make sure these segments are enclosed within <Enginee> or <Host> element in server.xml. ${clusterName} is from var/config/config-substitutions.properties, which should be identical within all nodes in a cluster.

...