Search code examples
c#.netignite

Support multiple environments in one Apache Ignite node


Currently we use Apache Ignite.NET thin client to cache different sets of data. For each data request we use separate cache created via IIgniteClient.CreateCache<TKey, TValue>() method. One cache contains set of enitities with same properties and should be removed after expiration independently from other caches.

The problem is that in production we want to have many instances of application (environments) work with one instance of Apache Ignite. Each application instance should be able to create cache with the same key as cache from other application has. Thus cache key will be unique only whithin one application instance.

Is there any way to independently store caches from different environments in Apache Ignite? In Redis for example there are different databases with unique numbers.

I tried to connect to the cache with DBeaver and saw one "Ignite" database, several sql schemas for each cache, one table in each schema. Can I create several databases in one Apache Ignite node?

Currenly the only 2 solutions I see:

  1. Add environment prefix to each cache key
  2. Host several instances of Apache Ignite service for each environment on 1 machine.

Solution

  • No, Apache Ignite does not have notion of 'databases'. It is assumed to be used in single-tenancy. If you do not care about security, you can get away with prefixes to cache names, etc.