-
1. Re: "numOwners" field in infinispan distributed grid
mircea.markus Apr 25, 2012 6:07 AM (in response to venkataratnamteki)I guess you'd have to plug in your own consietent hash function that should be able to hash a certain key based to a specific address (hashFunctionClass config attribute).
-
2. Re: "numOwners" field in infinispan distributed grid
venkataratnamteki Apr 25, 2012 6:28 AM (in response to mircea.markus)So, numOwners is number of replicas ?
-
3. Re: "numOwners" field in infinispan distributed grid
venkataratnamteki Apr 25, 2012 6:31 AM (in response to venkataratnamteki)i am going through org.infinispan.configuration.cache.HashConfiguration But, it has no provision to point to the identity(ip address ) of the replica...
-
4. Re: "numOwners" field in infinispan distributed grid
venkataratnamteki Apr 25, 2012 7:02 AM (in response to venkataratnamteki)If i understand correctly, below is the concept of numOwners. Please correct me if i am wrong.
I have a cluster of 3 nodes. A, B, C. on each node numOwners is set to 1.
That means, A's back up is B
B's back up is C
C's back up is A.
-
5. Re: "numOwners" field in infinispan distributed grid
galder.zamarreno Apr 30, 2012 6:06 AM (in response to venkataratnamteki)No, this is not buddy replication. The backup of each key is decided at runtime, based on hashing algorithms - https://docs.jboss.org/author/x/GwY5
-
6. Re: "numOwners" field in infinispan distributed grid
venkataratnamteki Apr 30, 2012 6:22 AM (in response to galder.zamarreno)Hi Galder,
Thanks for the reply.
I went through the link. Does this "Consistent hashing" algorithm default hashing algorithm that infinispan use?
Thanks,
-Venkat
-
7. Re: "numOwners" field in infinispan distributed grid
galder.zamarreno May 2, 2012 9:04 AM (in response to venkataratnamteki)I don't understand the question.
-
8. Re: "numOwners" field in infinispan distributed grid
venkataratnamteki May 2, 2012 9:07 AM (in response to galder.zamarreno)Does infinispan come with default hashing algorithm or user must implement his own hashing algorithm?
-
9. Re: "numOwners" field in infinispan distributed grid
galder.zamarreno May 4, 2012 3:47 AM (in response to venkataratnamteki)Obviously, there's a default hashing algorithm shipped.
-
10. Re: "numOwners" field in infinispan distributed grid
visagarw Jun 21, 2012 11:45 PM (in response to venkataratnamteki)Hi Galder,
As you mentioned that "backup of each key is decided at runtime", is there any way to find out that which server will be the backup of other server.
I think, Backup server means till the primay server runs backup server will not handle any request, all the request would be handled by the primary server.
if not configure primary and secondary server then how we can find out the backup or secondary server of the particular server, so that in case of the maintence we are sure that backup server is up.
Thanks in advance
-
11. Re: "numOwners" field in infinispan distributed grid
nadirx Jun 22, 2012 3:05 AM (in response to visagarw)Vishnu, the backup is "per key" and not "per server". All servers are active all the time. Therefore when I request a key it will always go to the primary node as computed by the consistent hash algorithm. If that node fails, the cluster recomputes the consistent hash for the keys it was holding, using the backups that are available on the other nodes and ensuring that keys will be on "numOwners" servers again. Here's an example:
- 3 servers (X Y Z) with a cache in distributed mode with numOwners=2
- cache.put("a", "a"); // the consistent hash algorithm decides to place key "a" on X and Y
- cache.put("b", "b"); // the consistent hash algorithm decides to place key "b" on Y and Z
- cache.put("c", "c"); // the consistent hash algorithm decides to place key "c" on X and Z
As you can see both keys "a" and "c" are on server X as primary but have different backups.
The AdvancedCache API has a method called "locate" which allows you to find the owners of a specific key.
-
12. Re: "numOwners" field in infinispan distributed grid
visagarw Jun 22, 2012 6:38 AM (in response to nadirx)Hi Tristan,
Thanks for reply.
I have downloaded the inifinispan-all.jar.
i am running the server using the >startServer.bat -r memcached -c ../etc/config-samples/config.xml -l 107.108.58.107 -p 8180
The config file having all the configuration and transport tag having a configuration file,tcp.xml file which having all the server information as follow.
<TCPPING timeout="3000"
initial_hosts="107.108.58.107[8180],107.108.58.107[8280]"
port_range="100"
num_initial_members="5"
ergonomics="false"
/>
and another server running on same machine but port Num 8280. Now,i want to check the put value from one Server replicate to other.
Could you please share your experience on it.
Thanks in advance.
--Vishnu
-
13. Re: "numOwners" field in infinispan distributed grid
galder.zamarreno Jul 5, 2012 8:07 PM (in response to visagarw)You could use any memcached client to check the contents. Alternatively enable JMX statistics and browse to the cache mbean with jvisualvm to see if any put/get operations are happening.