问题
I am looking for a java distributed caching solution. We would like features likes:
- Distributed
- Auto-Discovery
- Redundancy
- Non-Centralized
We've analyzed a framework like TerraCotta which seems to be everything we would ever want from a caching framework... However, there seems to be a central caching node(s) that is required which become our single-point-of-failure.
Any ideas other than rolling out our own solution?
回答1:
I suggest either JBossCache or EhCache (with a distributed cache listener). I've used both, I like both, and they both fit your requirements.
回答2:
Try Hazelcast. It is an open source clustering and highly scalable data distribution platform for Java. It fulfills all your requirements. Plus it is super easy to use.
回答3:
Terracotta recently acquired Ehcache and has released a tight integration of the Ehcache API with the Terracotta clustered store in a simple package and only requires a few extra lines of Ehcache configuration to go from single node to clustered, although you also have to run the Terracotta server process.
Ehcache with the Terracotta ES edition is open source and free to use. Commercial licenses are available if you want support, more scaling, indemnification, patch support, etc.
Terracotta does use a central server array, not a single central server, so there is no single point of failure! You can set up as many hot backup servers as you want and these backup servers can be configured to take over when the active server goes down. With Terracotta FX (commercial product), you can also use multiple active servers.
回答4:
Try Infinispan . Infinispan cache can be used as distributed cache and also can be used as Replicated cache . There is no possibility of Single Point Failure . In distributed cache mode it can provide more space than Heap Size. Consider there is 4 node in cluster each with 1GB Heap Size and Infinispan use as Replicated cache then total size cluster has 1 Gb but if Infinispan used as Distributed cache and set 2 copy per data item then total size will be 2Gb . http://www.jboss.org/infinispan
回答5:
Have you looked at Coherence?
We have found it very useful. It is not open source or cheap though.
http://www.oracle.com/technology/products/coherence/index.html
回答6:
Normally single point of failure occurs when all the operation are done on a single node and if that node goes down, the whole operation can go down. the solution of this problem is to use topology like Replica or partition replica. if once node goes down, the whole operation will shift to an other node without any kind of data lose.
as far as the features which you are looking can be found in a single product, NCache,as Umer has also mentioned.
回答7:
I'm late to the party but have you tried TayzGrid, an open source java distributed cache. Also known as in-memory data grid or key value store.
It answers all your basic needs
- Distributed
- Auto-Discovery
- Redundancy
- Non-Centralized
It also manages advanced failover scenarios like split brain and sudden restarts. All nodes are intelligent therefore completely distributed.
You also can also make a choice of which topology you want to use (Partition or replicated). If you want to use more advanced topologies(Partition of replica) then you can maybe buy a license.
回答8:
Terracotta also offers a distributed cache.
来源:https://stackoverflow.com/questions/1486895/distributed-caching