We are using jboss-portal-2.6.5.SP1. Our application is memory intensive. Sessions hold reference to a lot of data.
Due to extensive memory usage we have started facing heap issues in production. Increasing the heap is one option, but we are also planning to go for a clustered environment with session replication to reduce the load on a single server.
My question is:
How does session replication work in JBoss?
A. are the replicated sessions saved in memory on each node in the cluster OR
B. are they written to physical disk on the nodes to which they are replicated and recovered when necessary.
Logically, it should be 'B', otherwise scaling the system would make no sense if each node in the cluster is loaded with all the sessions information of all the nodes.
Please feel free to ask if my question is not clear.
You are mixing session replication and session storage.
Fot the storage itself it's a mix of your A and B, you wouldn't want your sessions to always be writter/read from the filesystem, so it does it when needed, it is called passivation.