-
1. Re: Infinispan-invalidation Mode
chavarao Sep 10, 2012 5:55 PM (in response to 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 Sep 11, 2012 3:26 PM (in response to chavarao)Hi Galder,
Can you please take a look at this one?
Thanks
-
3. Re: Infinispan-invalidation Mode
mircea.markus Sep 12, 2012 8:47 AM (in response to chavarao)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 Sep 12, 2012 12:33 PM (in response to mircea.markus)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 Oct 2, 2012 2:00 PM (in response to chavarao)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..