Is it possible to implement distributed caching using Ehcache without Terracotta Enterprise Suite?

I am trying to find how to implement distributed caching for applications.

Ehcache, already used for caching in my project, so I'm looking for how to solve this problem using it. But, unfortunately, it seems that Terracotta Enterprise Suite is necessary for this, and it is commercial. Is not it? Is there another solution how to use Ehcache for distributed caching (RMI or something else)?

+8
java ehcache distributed-caching
source share
3 answers

You do not need the terracotta enterprise package to cluster your Ehcache instances. So today you can use clustering with Ehcache and Terracotta with pure OSS:

http://www.ehcache.org/documentation/configuration/distributed-cache-configuration

Edit: This link has expired. Below is a new link related to the clustered cache http://www.ehcache.org/documentation/3.4/clustered-cache.html

Now, if you need replication, you can use other mechanisms, such as RMI:

http://www.ehcache.org/documentation/replication/index

Although, only the Terracotta cluster will bring you HA and features such as consistency guarantees, etc ...

+2
source share

There are various ways to implement a distributed cache using the ehcache mechanism. You can use RMI or Jgroups.

In one of the projects, I went through the same situation, and after some research, I realized that using a Redis server to manage the cache is a simple and effective solution.

I suggest this as an answer because if you try to use ehcache, it will take time and complexity, and you can have several cache managers in your workspace.

+1
source share

You might want to try Hazelcast . It is an open source, distributed cache and very easy to use.

PS: I work for Hazelcast

0
source share

All Articles