简体   繁体   中英

Ignite cluster with mixed persistent/non-persistent cache nodes

In my Apache Ignite 2.3 cluster I want to run one node (probably two in the future for a backup) that has my replicated cache persistent on disk. I need to make sure this node is always up while other cache nodes don't have the persistent configuration and therefore access the cache only in memory. These non-persistent nodes can come and go frequently on demand as they are for computing but not for storing data.

When a non-persistent node is connected, what happens when the persistent node goes down? Ideally the cache should go away for the whole cluster but it doesn't. All nodes continue using the cache in memory it seems. But this means the new data will never be on disk and gone after cluster restart. Is my configuration with mixed persistent/non-persistent nodes not common? How would I keep this type of cluster consistant?

Any background help appreciated.

You can configure your cache to be stored on a single node only. So, when it goes down, the cache stops functioning. It can be done by using node attributes and a node filter .

But in this configuration every request will be sent to a single node, making work of additional nodes slower. If you want to avoid it, consider using a near cache .

You can set node filter for you cache configuration and exclude compute nodes:

https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/configuration/CacheConfiguration.html#setNodeFilter(org.apache.ignite.lang.IgnitePredicate)

so the cache will be stored only on the particular set of nodes that you defined.

To distinct ignite instances, you can use user attributes in ignite configurations: https://apacheignite.readme.io/docs/cluster#section-cluster-node-attributes

This is not possible; persistence is enabled on cache level and therefore all nodes where this cache is deployed will persist data to disk.

Moreover, I don't think you would benefit from such deployment. If it's a replicated cache and you start a new node, you need to copy the data to this new node before it's available in memory. Before rebalancing is not finished, you will do remote calls for this data. Loading it from disk instead will not be slower, likely much faster.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM