The following commands will send the same request to all nodes in the cluster. Results is returned as a dict with k,v pair (NodeID, Result).

bgrewriteaof

bgsave

client_getname

client_kill

client_list

client_setname

config_get

config_resetstat

config_rewrite

config_set

dbsize

echo

info

lastsave

ping

save

slowlog_get

slowlog_len

slowlog_reset

time

The pubsub commands are sent to all nodes, and the resulting replies are merged together. They have an optional keyword argument aggregate which when set to False will return a dict with k,v pair (NodeID, Result) instead of the merged result.

pubsub_channels

pubsub_numsub

pubsub_numpat

This command will send the same request to all nodes in the cluster in sequence. Results is appended to a unified list.

keys

The following commands will only be send to the master nodes in the cluster. Results is returned as a dict with k,v pair (NodeID, Command-Result).

flushall

flushdb

scan

This command will sent to a random node in the cluster.

publish

The following commands will be sent to the server that matches the first key.

eval

evalsha

This following commands will be sent to the master nodes in the cluster.

script load - the result is the hash of loaded script

script flush - the result is True if the command succeeds on all master nodes, else False

script exists - the result is an array of booleans. An entry is True only if the script exists on all the master nodes.

The following commands will be sent to the sever that matches the specified key.