Tomcat / jBOSS sessions - where are they usually stored?

前端 未结 3 391
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-18 13:24

Preface: I\'m not a java developer.

I have a question about Tomcat / jBOSS and other java application servers. Where are sessions (session data) stored? In PHP, se

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-18 13:57

    The JavaEE spec does not dictate this, it is up to the individual implementations to decide. For example, the usual way to handle load balancing in Tomcat is to use replicated sessions, where the session data is multicast between the nodes. Storing session data in the database is a huge performance killer, and while Tomcat may support it, I really wouldn't recommend it.

提交回复
热议问题