-
1. Re: Externalize HTTP Session
ctomc May 24, 2017 3:46 PM (in response to vaughnmb)clustering does just that
you can implement your own SessionManager that has its backend wherever you want.
you can than register it via ServletExtension
-
2. Re: Externalize HTTP Session
vaughnmb May 24, 2017 5:05 PM (in response to ctomc)By "clustering does just that" are you speaking of http session replication shared between wildfly app server nodes? I was thinking if you could write the http session data to something like Redis, then you don't need clustering. I am trying to solve the problem of scaling a JSF application in a Docker Swarm. If the http session data lives outside the Wildfly app server, then any Wildfly app server can just pull it's session data from Redis and you get easy fail-over. If a Docker container goes down, the other containers can keep serving the requests. You wouldn't need any type of sticky-sessions. You could scale the containers easily. Does that possibility exist or do I have to implement my own session manager?
-
3. Re: Externalize HTTP Session
pferraro May 25, 2017 1:24 PM (in response to vaughnmb)WildFly's distributed session manager can be configured to externalize web session by using an Infinispan invalidation-cache in combination with a remote-store. However, the use of an invalidation cache can be costly in the absence of sticky sessions, since each write to the remote cache will result in a cluster-wide invalidation message.
WF12 will add a stateless distributed session manager that externalizes web sessions to remote infinispan caches (via hotrod). The core of the implementation already exists: GitHub - wildfly-clustering/wildfly-clustering-web-hotrod: HotRod implementation of wildfly-clustering-web-spi
All that remains is:
- Infinispan subsystem support for remote cache managers: [WFLY-6634] Add remote-cache-container/remote-cache configuration to Infinispan subsystem - JBoss Issue Tracker
- Move wildfly-clustering-web-hotrod (and dependencies) into WF
- Wiring of the remote cache to the session manager: [WFLY-5550] Formalize web session clustering modules into a proper subsystem - JBoss Issue Tracker
Keep in mind that, while completely externalized sessions may offer some scaling benefits (i.e. scaling your app server layer without affecting your session persistence layer (or visa versa)), it will always perform worse than the traditional distributed session manager, since all access to the session access will incur the cost of remote invocation, deserialization, etc.
-
4. Re: Externalize HTTP Session
vaughnmb May 25, 2017 2:15 PM (in response to pferraro)When is Wildfly 12 expected to be released?