You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This ID will be used forever by this specific instance in order for the instance to have a unique name in the context of the cluster. Every node remembers every other node using this IDs, and not by IP or port. IP addresses and ports may change, but the unique node identifier will never change for all the life of the node. We call this identifier simply Node ID
I learned the above from redis website,so I decided to test the feature and designed the following experiment:
1,setup and run a redis cluster with 3 master and 4 slave,through the command cluster meet and cluster addslot,not the redis-trib ruby program
2.fail a master redis instance,and wait for its slave to failover
3,change the failing master redis's ip,and restart it
4,check the output of "cluster nodes"
a.from other redises
192.168.254.3:7000> cluster nodes
6af4d1ee08e04759835804d852c0a8c9477528e4 192.168.254.14:7000 slave 2a0674f730dbd6fd3ba01e7d360f70e63bcff584 0 1483329653617 9 connected
1769f48059c1b4a98bf13af89555d95204ac37ce 192.168.254.4:7000 master - 0 1483329652105 1 connected 0-5000
3f4917c49c7e12c5ab6adfd0a853a98a76990a12 192.168.254.9:7000 slave 1769f48059c1b4a98bf13af89555d95204ac37ce 0 1483329651599 3 connected
2a0674f730dbd6fd3ba01e7d360f70e63bcff584 192.168.254.11:7000 master - 0 1483329652609 9 connected 10001-16383
d62081569c43c8c5238ac744015a6786b185fb1f 192.168.254.12:7000 slave 2a0674f730dbd6fd3ba01e7d360f70e63bcff584 0 1483329651498 9 connected
353f28d3bb76fb884741cfd5485f3401023c5f41 192.168.254.3:7000 myself,master - 0 0 2 connected 5001-10000
df59d544a5e534a4128a2a058cc43382979576ac 192.168.254.10:7000 slave 353f28d3bb76fb884741cfd5485f3401023c5f41 0 1483329652609 2 connected
192.168.254.14:7000 is the address of the new redis instance,now it is slave.Everything is good.
b.from the original master redis
192.168.254.14:7000> cluster nodes
1769f48059c1b4a98bf13af89555d95204ac37ce 192.168.254.4:7000 master - 0 1483330114757 1 connected 0-5000
3f4917c49c7e12c5ab6adfd0a853a98a76990a12 192.168.254.9:7000 slave 1769f48059c1b4a98bf13af89555d95204ac37ce 0 1483330115768 3 connected
353f28d3bb76fb884741cfd5485f3401023c5f41 192.168.254.3:7000 master - 0 1483330114757 2 connected 5001-10000
6af4d1ee08e04759835804d852c0a8c9477528e4 192.168.254.5:7000 myself,slave 2a0674f730dbd6fd3ba01e7d360f70e63bcff584 0 0 8 connected
df59d544a5e534a4128a2a058cc43382979576ac 192.168.254.10:7000 slave 353f28d3bb76fb884741cfd5485f3401023c5f41 0 1483330114252 2 connected
2a0674f730dbd6fd3ba01e7d360f70e63bcff584 192.168.254.11:7000 master - 0 1483330115768 9 connected 10001-16383
d62081569c43c8c5238ac744015a6786b185fb1f 192.168.254.12:7000 slave 2a0674f730dbd6fd3ba01e7d360f70e63bcff584 0 1483330114252 9 connected
192.168.254.5:7000 is the address of the original redis instance,but it's wrong.it shoud be 192.168.254.14:700
The text was updated successfully, but these errors were encountered:
This ID will be used forever by this specific instance in order for the instance to have a unique name in the context of the cluster. Every node remembers every other node using this IDs, and not by IP or port. IP addresses and ports may change, but the unique node identifier will never change for all the life of the node. We call this identifier simply Node ID
I learned the above from redis website,so I decided to test the feature and designed the following experiment:
1,setup and run a redis cluster with 3 master and 4 slave,through the command cluster meet and cluster addslot,not the redis-trib ruby program
2.fail a master redis instance,and wait for its slave to failover
3,change the failing master redis's ip,and restart it
4,check the output of "cluster nodes"
a.from other redises
192.168.254.3:7000> cluster nodes
6af4d1ee08e04759835804d852c0a8c9477528e4 192.168.254.14:7000 slave 2a0674f730dbd6fd3ba01e7d360f70e63bcff584 0 1483329653617 9 connected
1769f48059c1b4a98bf13af89555d95204ac37ce 192.168.254.4:7000 master - 0 1483329652105 1 connected 0-5000
3f4917c49c7e12c5ab6adfd0a853a98a76990a12 192.168.254.9:7000 slave 1769f48059c1b4a98bf13af89555d95204ac37ce 0 1483329651599 3 connected
2a0674f730dbd6fd3ba01e7d360f70e63bcff584 192.168.254.11:7000 master - 0 1483329652609 9 connected 10001-16383
d62081569c43c8c5238ac744015a6786b185fb1f 192.168.254.12:7000 slave 2a0674f730dbd6fd3ba01e7d360f70e63bcff584 0 1483329651498 9 connected
353f28d3bb76fb884741cfd5485f3401023c5f41 192.168.254.3:7000 myself,master - 0 0 2 connected 5001-10000
df59d544a5e534a4128a2a058cc43382979576ac 192.168.254.10:7000 slave 353f28d3bb76fb884741cfd5485f3401023c5f41 0 1483329652609 2 connected
192.168.254.14:7000 is the address of the new redis instance,now it is slave.Everything is good.
b.from the original master redis
192.168.254.14:7000> cluster nodes
1769f48059c1b4a98bf13af89555d95204ac37ce 192.168.254.4:7000 master - 0 1483330114757 1 connected 0-5000
3f4917c49c7e12c5ab6adfd0a853a98a76990a12 192.168.254.9:7000 slave 1769f48059c1b4a98bf13af89555d95204ac37ce 0 1483330115768 3 connected
353f28d3bb76fb884741cfd5485f3401023c5f41 192.168.254.3:7000 master - 0 1483330114757 2 connected 5001-10000
6af4d1ee08e04759835804d852c0a8c9477528e4 192.168.254.5:7000 myself,slave 2a0674f730dbd6fd3ba01e7d360f70e63bcff584 0 0 8 connected
df59d544a5e534a4128a2a058cc43382979576ac 192.168.254.10:7000 slave 353f28d3bb76fb884741cfd5485f3401023c5f41 0 1483330114252 2 connected
2a0674f730dbd6fd3ba01e7d360f70e63bcff584 192.168.254.11:7000 master - 0 1483330115768 9 connected 10001-16383
d62081569c43c8c5238ac744015a6786b185fb1f 192.168.254.12:7000 slave 2a0674f730dbd6fd3ba01e7d360f70e63bcff584 0 1483330114252 9 connected
192.168.254.5:7000 is the address of the original redis instance,but it's wrong.it shoud be 192.168.254.14:700
The text was updated successfully, but these errors were encountered: