Search code examples
cachingignitegridgainnear-cache

Apache Ignite NearCaches Vs CachMode


Apache Ignite has two concepts, one of them is NearCache, and another one is the CacheMode enumaration.

What is the main difference between two concepts?


Solution

  • Near cache is the local hot cache that keeps often accessed data. It significantly speeds up data processing, saving time on network round-trips.

    CacheMode defines how your data will be stored. It could be LOCAL for single node, which means data are not distributed in grid. Other two PARTITIONED and REPLICATED means respectively: cache data divided between nodes on some equal parts (called partitions) or each node keeps full data from that cache.

    PARTITIONED allows you to keep in grid more data than available in separate machine, REPLICATED gives 100% data survivorability (if all nodes crashed except one - you will not loose your data).

    More details you can find in documentation https://apacheignite.readme.io/docs/near-caches and https://apacheignite.readme.io/docs/cache-modes