I am looking for a solution for sharing a cache between two tomcat web applications running on different hosts. The cache is used for data synchronization, so the cache must be constantly updated between two tomcat instances. (Sorry, I'm not 100% sure if the correct terminology for this requirement is "consistency" or something more specific, for example, using the ACID property). Another requirement, of course, is that it must quickly access the cache, with approximately the same number of entries in the form of readings. I have access to a shared file system, so this is a consideration.
I looked at something like ehcache, but in order to get a common cache between web applications that I would need to implement on top of the Terracotta environment or using the new ehcache cache server. The first one (Terracotta) seems redundant for this, while the cache web server does not seem to provide the fast performance I want.
Another solution I was looking at was to create something simple on top of a fast keystore such as Redis or memcachedb. Redis is in memory, but can be easily configured as a centralized cache, and memcachedb is a persistent disk-based cache that can work because I have a common file system.
I am looking for suggestions on how to best solve this problem. The solution should be a relatively mature technology, as it will be used in a production environment.
Thanks in advance!
source share