Tomcat 6 cluster with shared objects

We have a large cluster of tomcat servers, and I'm trying to find an efficient way to share quantity among all. This account is the number of widgets purchased and should be checked for each page view. Any server can complete the sale and increment, which are considered, and at this point the new value should be available to all members of the cluster.

We do not want to use counting from the database, because there will be many pageviews between updates in the cluster, and the get operation for db for each pageview seems unnecessary.

We have an extensive memcached cluster where we can save the value, get it on every pageview, and anyone who updates the value sets a new value for the cluster. This again seems wasteful due to the fact that the cache is obtained for each page view.

What I would like to do is make a difference in the memory on each server, and a message with a multicast (or similar mechanism) tells all servers that they simply increased, and the new number is X. This would seem to be most because that the action is performed only when the update is performed, and not for work for each page view.

How did you deal with this in your applications? I changed my mind ... should we just throw it in memcached?

Thanks!

+3
3

memcached, , , . , . , - , .

+1

JBossCache EhCache UDP, . memcached, , "-" . java, .

JBossCache sync/async, , , EHCache.

+2

Terracotta. JVM, .

Ehcache, XML.

Terracotta provides commercial and open source licenses, and they typically use open source for advertising, but the free open source will definitely do what you need and let your applications scale for a very long time.

+1
source

All Articles