-
1. Re: session replication to only one node
ctomc Aug 24, 2015 6:52 AM (in response to jjakub)1 of 1 people found this helpfulThere are many options on how to configure clustering.
Clustering is backed by infinispan, which has lots of operation modes and configuration options.
for start see Infinispan User Guide
-
2. Re: session replication to only one node
wdfink Aug 24, 2015 7:57 AM (in response to jjakub)Which version of WildFly do you use?
If I look to 9.0x I see that the standalone-ha.xml defines the infinispan caches (web/ejb) as distributed with numOwner=2 which is exact what you want.
If you have further questions you should give us informations about what version do you use, which configuration and use-case you have.
-
3. Re: session replication to only one node
pferraro Aug 24, 2015 8:05 AM (in response to jjakub)1 of 1 people found this helpfulJa kub wrote:
Default Wildfly cluster configuration will enable all-to-all session replication - session will be replicated to all nodes in a cluster or all nodes in server group.
As of WF8, this is no longer the case. Our default configuration will only replicate a session to a single node - although any session is still accessible from any node.
I want session to be replicated to only one node - a backup node. I wan't it to be memory effective.
In apache tomcat there is sth like BackupManager in oppose to DeltaManager.
Is it possible to do in Wildfly ? How can I do it most simple way?
Maybe it is possible to do by configuring some multicast addresses creating some subclusters, but I would like to cluster by itself take care of session backup replication.
The default web session configuration (for both "ha" and "full-ha" server profile) uses a distributed cache, with the number of owners set to 2. This means that the cluster will only store 2 copies of an given web session, one on node on which the session was created, and another as determined by a consistent hash function. The old behavior (AS7 and earlier) can be achieved by reverting the cache configuration to a replicated cache.
-
4. Re: session replication to only one node
jjakub Aug 24, 2015 8:43 AM (in response to pferraro)Paul thx for response,
I was mislead (?) by WildFly 8 Clustering and Session Failover (Tech Tip #16)
By default, sessions are replicated on all nodes in a server group.
It seems to me that either Arun or You Paul are mistaken regarding default Wildfly 8 configuration, or I badly understand what I read (I'm esl).
Possibly by default they are replicated to single node from Wildfly 9, this would be consistent with what Wolf-Dieter wrote.
Is there any official Wildfly doc in this topic ? Google finds above Arun blog.
-
5. Re: session replication to only one node
pferraro Aug 24, 2015 9:27 AM (in response to jjakub)1 of 1 people found this helpfulThe definitive answer can always be found in the source:
In 8.0, the default configuration uses a distributed cache with the number of owners set to 4. We decreased this to 2 in 8.1 and later.
Tip #17: Always trust the developer over the marketing guy...