A cluster valve is no different from any other Tomcat Valve. The cluster valves are interceptors in the invocation chain for HTTP requests, and the clustering implementation uses these valves to make intelligent decision around data and when data should be replicated.
The ReplicationValve will notify the cluster at the end of a HTTP request so that the cluster can make a decision whether there is data to be replicated or not.
filter For known file extensions or urls, you can use this Valve to notify the cluster that the session has not been modified during this request and the cluster doesn't have to probe the session managers for changes. If the request matches this filter pattern, the cluster assumes there has been no session change. An example filter would look like filter=".*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt" . The filter is a regular expression using java.util.regex.
In case of a mod_jk failover, the JvmRouteBinderValve will replace the jvmWorker attribute in the session Id, to make future requests stick to this node. If you want fallback capability, don't enable this valve, but if you want your failover to stick, and for mod_jk not to have to keep probing the node that went down, you use this valve.
The ClusterSingleSignOn supports feature of single sign on in cluster. By using ClusterSingleSignOn, the security identity authenticated by one web application is recognized by other web applications on the same virtual host, and it is propagated to other nodes in the cluster.
The Valve uses a replicated map. You can setup the flag for how this map sends messages. The default value is 6 (synchronous). Note that if you use asynchronous messaging it is possible for update messages to be processed by the receiving node in a different order to the order in which they were sent.
Set to true if you wish this Valve to fail if the underlying replication fails to start. If the Valve fails, then the associated container will fail to start. If you set this attribute to false, and the underlying replications fails to start, the Valve will start and it will attempt to join the cluster and start replication as part of the heartbeat process. If not specified, the default value of false is used.
accessTimeout The timeout for a ping message. If a remote map does not respond within this timeout period, its regarded as disappeared. Default value is 5000 milliseconds.
If you have trouble and need help, read Find Help page and ask your question on the tomcat-users mailing list. Do not ask such questions here. This is not a Q&A section.
The Apache Comments System is explained here. Comments may be removed by our moderators if they are either implemented or considered invalid/off-topic.