Redis doesnt support master master replication.
In the redis tutorial I can see that there is a configuration , with 6 nodes, 3 master, 3 slaves,
Can any one tel
First of all you can change the default configuration if you do little work in
redis-trib.rb
in function def check_create_parameters
. You can set one master and one slave replica.
The purpose for this configuration is for fault tolerance. The slaves also can be used for read (READONLY). In the three masters, the hashslots equally distributed and with a load balancing algorithm you can re-distribute and the actual keys. The steps of a possible algorithm that distirbutes the keys among the nodes are (tested by me and it works as expected):
This algorithm will help to minimize the response time. What i mean:
With three masters the response time can be minimized. If you have a configuration with one master and this master holds for example 30000 #keys, the response time to get 1000keys at once is > from a configuration with 2 masters that holds 15000 each.
If you create a key in master1, then if you try to reach(read) that key from master2 you will get a MOVED error. So, the solution is to create a smart client that maps the hashslots to the corresponding node. Thus, you can delete the key from master2 only in the case that master2 redirects your request to the correct master.
Hope that helps.