Test the cluster
You can run quick tests to verify that your cluster is operating properly.
Verify successful failover by pausing Redis the primary node, and then checking which node is now
the primary.
- On the primary node, put Redis to sleep by using the following command
syntax:
/opt/aspera/bin/asredis -p redis_port -h node_ip DEBUG sleep num_secondsFor example,
# /opt/aspera/bin/asredis -p 31415 -h 10.11.100.160 DEBUG sleep 30 - On one of the other nodes, see which one is now the primary node by using the following command
syntax:
/opt/aspera/bin/asredis -p sentinel_port -h node_ip SENTINEL get-master-addr-by-name myprimary_nameFor example,
# /opt/aspera/bin/asredis -p 41415 -h 10.11.52.248 SENTINEL get-master-addr-by-name myprimary_name
Verify that replication works across the cluster. First, make a change on one node that adds an
entry to the Redis database (for example add a user). Then, verify that it is consistent across the
nodes. Finally, remove the change, and verify that it is gone from the cluster.
- Create user on one node.
# /opt/aspera/bin/asnodeadmin -au usr2 -p pass2 -x root - From a second node, check that the user was created.
# asnodeadmin -l - From a third node, remove the user.
/opt/aspera/bin/asnodeadmin -du usr2 - From the first node, check that the user is gone.
# asnodeadmin -l