Tomcat clustering using spring

I have a Spring web application with singleton services. There are also some singleton variables, such as a map with session data for all authenticated users, and so on. Everything works well on one server, but how to distribute this system between multiple servers? The system runs under Tomcat.

Thanks in advance!

+3
source share
3 answers

Terracotta supports Spring and provides only one singleton bean among all instances of the Terracotta cluster.

All you have to do is enable Terracotta and declaratively add singleton beans to the cluster.

, -.

+2
0

, . Google Singleton Detector. , java- . , , .

, . .

0

Source: https://habr.com/ru/post/1751517/


All Articles