Couchbase vs. Hazelcast for Disributed Memory


#1

I am debating using couches server for an application that I have been working on the design for. One thing, however, concerns me. The application I am building will have a very high level of concurrency and the only way to manage that in a reasonable way is to use a memory cache of some kind. I am very familiar with Hazelcast and its operation so I wanted to know if Couchbase provided the distributed memory caching tech or if I needed to stack Hazelcast on top of Couchbase.

The basic principle is that I will have data that will get hammered by the application. In Hazelcast I would read this data out of the concurrent store and put it in the cache and then all of the nodes in the cluster would have the data which would be serialized between machines. The question is if I have Couchbase connected to a cluster and read an object will that create a distributed memory cache like Hazelcast or will each node have to independently read and store the data. Of course if that is the case this becomes problematic because any changes to that data need to be reflected across the whole cluster without requiring the data to be actively searched again.

Any advice here would be appreciated.


#2

Hmm no answers to any of the questions i post here? Low traffic? Questions too hard? Making me wonder if this is the product for my business venture.


#3

@kraythe sorry for the delayed response, during christmas it is always a bit slower.

First, I recommend you to read up on the principles of couchbase (we have some great webinars out there too), which shows how Couchbase works. Every document is stored and persisted on one Server, with configurable replicas. Now the main question you want to ask yourself is: do I need an in-memory data grid or a database? Both have distinct strength and weaknesses compare to each other. Note that one approach that might work for you too is to use Couchbase as the backing store of your Hazelcast cluster, as far as I know this should work.

Btw, the way couchbase works is that it uses a consistent hashing algorithm so that every node in your app cluster will grab the document from the same server, in a high performance fashion. In terms of latency it will be higher compared to hazelcast on the app server itself (since you have the network in between), but if hazelcast also needs to go ask other nodes you have the same potential bottleneck.

Do you have any specific questions regarding your application?

You may also want to consider talking to our presales/solution architects if you want to get into deeper conversations about how Couchbase is right for your business venture.