1 Reply Latest reply on Mar 4, 2013 8:20 AM by Galder Zamarreño

    How to find Infinispan local entries in a distributed cache cluster

    hasan serdar Newbie



      I want to use Infinispan as a distributed 2LC for hibernate in a cluster. First of all is this a good idea ? or distributed mode is not suitable for hibernate 2LC ?


      My application will work on the whole cache data tens of times in a second and I want to seperate the data operation. I think I can do that by distributing the whole data by 2LC infinispan and work on the local cahe in each cluster node. I dont know how to reach only the local entities in a node. If I use EntityManager.find(Items); It will automatically find the whole data in the cluster.


      Help please

        • 1. Re: How to find Infinispan local entries in a distributed cache cluster
          Galder Zamarreño Master

          Distribution means that some entries are not available locally and hence will need to query other nodes. How much more cheap/expensive this is compared to a round-trip to the database is the type of question you should be asking yourself. It also depends on number of cluster nodes. Replication works well up to 4-6 nodes. Test the performance of your use case with replication vs distribution, that might give you a better idea which one suits better your use case. With replication, you can work on the local data without problems because all nodes contain the same data (total replication, all data replicated to all nodes).