Distribution mode cache for the web subsystem breaks session stickiness

Solution Unverified - Updated -


  • JBoss Enterprise Application Platform (EAP) 6.4.10 and earlier
  • JBoss Enterprise Application Platform (EAP) 7.x


  • Distribution mode cache for the web subsystem breaks session stickiness. When using dist mode, if you remove a worker from the balancer, but it is still part of the cluster other nodes will continually send any requests stuck to the original node back to the original node without updating the jvmRoute. This causes sessions to 'spray' all over the cluster without sticking to a new node, which can cause session locking issues.


  • This saw a change released in 6.4.11. By setting -Djvmroute.dist.local.node=true on 6.4.11 and later, dist mode will then sticky a request to the current local node instead of try to continually sticky requests to a potentially unreachable dist session owner and causing session spraying.
  • For EAP 7: JBEAP-6078 It has not been fixed in 7.x yet. (Note the same behavior happens with both "dist" and "repl" modes in EAP 7.x because "repl" is implemented as a special case of "dist" (i.e. where owners == cache view size) in EAP 7.x.
  • Otherwise, an immediate workaround is to us the replicated cache mode for the web subsystem instead of dist mode.

Root Cause

  • This is the result of the design of distribution mode. When a node gets a request and does not own the session, then instead of making a network call to get the session information, it sends the request back to the originating node, thereby saving a network call.
  • For EAP 6: BZ-1233400

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.