5 Replies Latest reply on Oct 2, 2012 2:00 PM by mircea.markus

    Infinispan-invalidation Mode

    chavarao

      I have setup two infispan hot rod servers A,B and both formed the cluster.

       

      I  have Hotrod client that connects to Server A( specified in server A) , I did cache.put  for caching 10 entries.

       

      When I try to get the data from Hotrod sever I  got 10 entries thats good.

       

      I changed my Hotrod client  to point to HotRodServer B and I am expecting no  data at all because specs says that no data sharing between them only invalidation when distributed mode is invalidation.

       

      Am I configuring wrong?

       

      Thanks

        • 1. Re: Infinispan-invalidation Mode
          chavarao

          I think this is what happening.  its using TcpTransportFactory  which is by default using RoundRobinBalancingStrategy .

           

          Why its using RoundRobinBalancingStrategy ?  

           

          Why its tranfering the data between nodes when I use invalidation mode ?

           

           

          315 [main] DEBUG org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory  - Load balancer class: org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy

           

          some one suggested on the forum that set infinispan.client.hotrod.ping_on_startup to false will use consitenthash instead of RoundRobinBalancingStrategy.

           

           

          see below hot rod client settings.

           

          infinispan.client.hotrod.transport_factory = org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory

          infinispan.client.hotrod.server_list = app1:11223
          infinispan.client.hotrod.marshaller = org.infinispan.marshall.jboss.GenericJBossMarshaller
          infinispan.client.hotrod.async_executor_factory = org.infinispan.client.hotrod.impl.async.DefaultAsyncExecutorFactory
          infinispan.client.hotrod.default_executor_factory.pool_size = 1
          infinispan.client.hotrod.default_executor_factory.queue_size = 10000
          #infinispan.client.hotrod.hash_function_impl.1 = org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashV1
          infinispan.client.hotrod.hash_function_impl.2 = org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashV2
          infinispan.client.hotrod.tcp_no_delay = true
          infinispan.client.hotrod.ping_on_startup = false
          #infinispan.client.hotrod.request_balancing_strategy = org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy
          infinispan.client.hotrod.key_size_estimate = 64
          infinispan.client.hotrod.value_size_estimate = 512
          infinispan.client.hotrod.force_return_values = false

          ## below is connection pooling config
          maxActive=99
          maxTotal = 98
          maxIdle = 97

          • 2. Re: Infinispan-invalidation Mode
            chavarao

            Hi Galder,

             

            Can you please take a look at this one?

             

            Thanks

            • 3. Re: Infinispan-invalidation Mode
              mircea.markus

              I changed my Hotrod client  to point to HotRodServer B and I am expecting no  data at all because specs says that no data sharing between them only invalidation when distributed mode is invalidation.

              After the intial conction to the server, the HR client will be aware of both servers in the cluster. On each get it will go to the one that holds the data, by locally calculating where a certain key maps to. That explins why you still get the values.

              • 4. Re: Infinispan-invalidation Mode
                chavarao

                Thank you.

                 

                After the intial conction to the server, the HR client will be aware of both servers in the cluster. On each get it will go to the one that holds the data, by locally calculating where a certain key maps to. That explins why you still get the values.

                It looks like invalidation is same as distribution clustering mode  in HR client  point of view?

                 

                My confusion was when HR Client using RoundRobin balancing strategy vs  calculating where a certain key belongs to?

                 

                Does it always look at one sever if key not there look at other server? I do not think so.

                 

                Thanks

                • 5. Re: Infinispan-invalidation Mode
                  mircea.markus

                  HR Client using RoundRobin balancing strategy vs  calculating where a certain key belongs to?

                  when using replicated mode there's no distribution so round-rubin is used.

                  For distributed modes the client computes..