How can i set up redist cluster to get full redundancy between two physical servers? by splitting them between, or otherwise? Please help, Thanks

454 views
Skip to first unread message

roopa

unread,
Apr 15, 2014, 8:09:23 PM4/15/14
to redi...@googlegroups.com
I have two physical servers and trying to test this new rdist cluster for full redundancy between two servers
are there any steps that I can follow, since I am new to this. Thanks in advance

Jan-Erik Rediger

unread,
Apr 16, 2014, 3:54:39 AM4/16/14
to redi...@googlegroups.com
You should read the Redis Cluster tutorial[1] and follow its steps to
get an idea how Cluster works.
Another good way to get started is to use mattsta's Redis Cluster
Playground Guide[2].

Keep in mind that with Redis Cluster you shard your data. That means not
one single node has all data but only a subset. So it might or might not
be what you want.

If you have any more questions feel free to ask on this mailing list or
join the irc channel (#redis on freenode)

Jan-Erik


[1]: http://redis.io/topics/cluster-tutorial
[2]: https://github.com/mattsta/redis-cluster-playground
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.

roopa

unread,
Apr 16, 2014, 10:26:32 AM4/16/14
to redi...@googlegroups.com


On Tuesday, April 15, 2014 8:09:23 PM UTC-4, roopa wrote:
I have three physical servers and trying to test this new rdist cluster for full redundancy across all 3 servers
are there any steps that I can follow, since I am new to this. Thanks in advance

sorry for not being clear:

say I have three servers:
A, B, C and each server has say 4 nodes

A(A1, A2, A3, A4)
B(B1, B2, B3, B4)
C(C1, C2, C3, C4)

for example server A goes down, how does redis decide the rules for which server/port to contact under different scenario?
for example, Send all queries to port A1, on server A, if they fail go to port B1 on server B, and if that fails go to port C1 on server C

also on which server I run the 'redis-trib.rb' create command so that I can create cluster on each servers with nodes
and communicate with each other server

Please advise thanks
roopa

Jan-Erik Rediger

unread,
Apr 16, 2014, 1:18:18 PM4/16/14
to redi...@googlegroups.com
Did you already try the tutorial or played with Cluster? It doesn't
matter on which node you execute redis-trib.rb, it will communicate with
every node over TCP/IP, so you can execute it on any machine that can
reach all cluster nodes.

roopa

unread,
Apr 16, 2014, 2:15:47 PM4/16/14
to redi...@googlegroups.com
Hi Jan
thanks for the response
Yes I have been referring to the cluster to create cluster/redis instances

My question was:

i create cluster & redis instances across all 3 servers like this:

/etc/rcluster/redis/src/redis-trib.rb create --replicas 1 A:A1 A:A2 A:A3 A:A4 B:B1 B:B2 B:B3 B:B4 C:C1 C:C2 C:C3 C:C4

where A B C are all physical servers and A1, A2, A3, A4, B1, B2, B3, B4, C1, C2, C3, C4 are all port #'s

which will create 12 redis instances across 3 physical servers

what is the optimal server: redis instance ratio?

OR

Create cluster/redis instances on each server individually like this:

server A
------------
/etc/rcluster/redis/src/redis-trib.rb create --replicas 1 A:A1 A:A2 A:A3 A:A4

server B
------------
B:B1 B:B2 B:B3 B:B4

server C
------------
C:C1 C:C2 C:C3 C:C4

and join them so that they can communicate and auto-configure as master/salve

my confusion was how do we join all 3 clusters/4 redis instances/server?

in case i shutdown server A,  how does redis decide the rules for which server/port to contact under different scenario?

for above example, it was sending all queries to port A1, on server A,
but now I shutdown server A

will it go to port B1 on server B, and if that fails go to port C1 on server C etc

sorry about this lengthy detail
please advise if I am missing anything


roopa

unread,
Apr 17, 2014, 6:29:59 PM4/17/14
to redi...@googlegroups.com

I am trying to setup the cluster with Three nodes & I am getting the following error

Please help! Thanks

[root@au-test-centos6 src]# ./redis-trib.rb create --replicas 1 10.2.6.137:7000 10.2.6.137:7001 10.2.6.139:7002 10.2.6.139:7003 10.2.6.140:7004 10.2.6.140:7005

>>> Creating cluster

Connecting to node 10.2.6.137:7000: OK

Connecting to node 10.2.6.137:7001: OK

Connecting to node 10.2.6.139:7002: OK

Connecting to node 10.2.6.139:7003: OK

[ERR] Node 10.2.6.139:7003 is not empty. Either the node already knows other nodes (check with CLUSTER NODES) or contains some key in database 0.

[root@au-test-centos6 src]#

Matt Palmer

unread,
Apr 17, 2014, 6:31:33 PM4/17/14
to redi...@googlegroups.com
On Thu, Apr 17, 2014 at 03:29:59PM -0700, roopa wrote:
> I am trying to setup the cluster with Three nodes & I am getting the
> following error

[...]

> *[ERR] Node 10.2.6.139:7003 is not empty. Either the node already knows
> other nodes (check with CLUSTER NODES) or contains some key in database 0.*

Have you read the error message and done as it suggested?

- Matt

--
Microsoft: We took the "perfect" out of "Wordperfect"

Message has been deleted

roopa

unread,
Apr 17, 2014, 8:22:13 PM4/17/14
to redi...@googlegroups.com
I am now able to pass that error but
"./redis-trib.rb create --replicas" is just sitting at this line for aost 20 mins now:

>>> Performing hash slots allocation on 6 nodes...
Using 3 masters:
10.2.6.139:7002
10.2.6.137:7000
10.2.6.140:7004
Adding replica 10.2.6.137:7001 to 10.2.6.139:7002
Adding replica 10.2.6.140:7005 to 10.2.6.139:7002
Adding replica 10.2.6.139:7003 to 10.2.6.137:7000


does not show any error at all:-(

so I went & checked this:
./redis-trib.rb check 10.2.6.139:7003

Connecting to node 10.2.6.139:7003: OK
>>> Performing Cluster Check (using node 10.2.6.139:7003)
M: 0e3edb1f31c0d536b72e732c8d0d014c4ca49e31 10.2.6.139:7003
   slots: (0 slots) master
   0 additional replica(s)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[ERR] Not all 16384 slots are covered by nodes.

Any help will be apprecaited!

Thanks!


On Tuesday, April 15, 2014 8:09:23 PM UTC-4, roopa wrote:
Reply all
Reply to author
Forward
0 new messages