Session replication across JVMs in WebSphere

纵然是瞬间 提交于 2019-12-03 15:12:50

In WebSphere there are essentially two ways to replicate session data:

  1. Persisting to a database
  2. Memory-To-Memory transfers

Which one is appropriate for your needs is highly dependent on your application scenario:

How important is the persistence of your session data, when all your application servers go down? How many session objects do you have at any one time simultaneously?

In a DB you can store many sessions without much problems, the other option is always a question of how much memory is available.

I would go with the database, if you already got one set up, which all application servers use anyway.

Here is the link to the WebSphere Information Center with the necessary details.

One obvious solution is to enable clustering of your application servers. I assume from the way you worded your question you have rejected this option. Another option is to change the routing used by the web servers to use session affinity (requests for the same session go to the same app server).

Other that that, I'd second the answer by dertoni.

maybe you can look at 'terracota'. its an caching framework, which can cache sessions and runs on a seperate server

There are two options for clustering within WebSphere, session replication or database. If you have large session objects you are best off using database because it allows you to offload stale sessions to disk. If they are then represented then they can be extracted from the database, if you use session replication then those sessions need to stay in memory on not just your target server but also the other servers in the replication group. With large sessions this can lead to an out of memory condition.

With database session handling it is also very customisable and doesn't performance noticeably in the environments that I have used it.

don't forget oracle coherence.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!