You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by rushi_rashi <ru...@gmail.com> on 2017/05/18 06:16:05 UTC

How Cache Management Works

Hi,

I have a cache partitioned on 4 nodes and having 6 ignite instance per node. 
The key used for storing data is of type long.
I want to know how ignite decides where to store data.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-Cache-Management-Works-tp12987.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How Cache Management Works

Posted by Sasha Belyak <rt...@gmail.com>.
Hi,
ignite split every cache into some number of partitions and store
partitions on cluster nodes. It decide where to store data by two step:
1) calculate partitionId by key (long in your case)
2) calculate affinity function by partitionId and cluster topology. For
every partition affinity function return list of nodes: master, backup1,
backup2,... (if you specify backups in cache configuration). Ignite will
store partition accordingly this list.
If you specify node filter in cache configuration - ignite will use only
appropriate nodes (i.e. it will use only filtered nodes in affinity
function) and if you use standard affinity finction - it will try to
distribute equivalent numbers of partition to all nodes. In docs we have
pretty pictures for it:
https://apacheignite.readme.io/docs/cache-modes#partitioned-mode .
What exactly are you interested in?

2017-05-18 13:16 GMT+07:00 rushi_rashi <ru...@gmail.com>:

> Hi,
>
> I have a cache partitioned on 4 nodes and having 6 ignite instance per
> node.
> The key used for storing data is of type long.
> I want to know how ignite decides where to store data.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/How-Cache-Management-Works-tp12987.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: How Cache Management Works

Posted by Evgenii Zhuravlev <e....@gmail.com>.
Hi,

It's managed by Affinity function, you can read about it here:
https://apacheignite.readme.io/docs/affinity-collocation#section-affinity-function

Evgenii

2017-05-18 9:16 GMT+03:00 rushi_rashi <ru...@gmail.com>:

> Hi,
>
> I have a cache partitioned on 4 nodes and having 6 ignite instance per
> node.
> The key used for storing data is of type long.
> I want to know how ignite decides where to store data.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/How-Cache-Management-Works-tp12987.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>