Sambhav Sharma
Sambhav Sharma

Reputation: 5860

Does hazelcast in-memory queue scale up when new nodes are added?

I am trying to implement hazelcast. I was wondering if I use java.util.concurrent.BlockingQueue, it sets a max size automatically to it.

Let's say I start a cluster with one node in it, and implement BlockingQueue in it,
next I add one more node to the cluster, so will the queue's maximum size increase as now the cluster has a shared memory of two nodes?

I hope I made my point clear here.

Upvotes: 1

Views: 1063

Answers (1)

pveentjer
pveentjer

Reputation: 11307

You made your point clear.

The Hazelcast IQueue implementation is not a partitioned datastructure. So it will be stored completely on a single member (and the backup on another member).

So adding more members to the cluster will not increase the capacity of your queue.

One solution is to create a stripe of queues, so that the whole queue isn't stored on a single member. But it depends if you can deal with a stripe.

Upvotes: 4

Related Questions