5 Replies Latest reply on Mar 8, 2011 1:04 PM by galder.zamarreno

    Distributed in-memory only cache with eviction




      First, let me say Hi to the whole Infinispan community as this is my first post.


      Let me describe my case:


      The plan is:

      An in-memory only cache distributed on a cluster of 3 nodes with 2 owners per entry. Using the index size with a LRU eviction policy to keep a max count of objects we keep in cache hence in memory. As items are added in the cache, olders are kick-out and this is the intent. All entries are mortal but when the load gets significant, alive entries will also be evicted. So far so good but ..


      The issue:

      Let's assume a cluser of 3 nodes A, B & C with 2 owners per entries. Thus node A has item X and node B has its replicated copy. When A's index fills-up and eviction kicks-in and choose to evict X we observe the following:

      • Node A does not have X element anymore (OK)
      • Node B still has X copy (OK)

      We understand this and this is well documented. Now if we try to access element X on each node we have:

      • Node A returns not found
      • Node B returns X
      • Node C returns only X key without the data

      This is where our issue starts.


      Reading through the doc leads me to conclude eviction will only work in this mode if there is a cache store (with or without passivation) to back the cache data container.

      So the questions:

      • Is eviction requires a cache store in a distributed mode to work?
      • Have we felt into a permitted but not supported config?
      • Any future plans to make it work as we intended to?
      • Any other way out of this?