-
Notifications
You must be signed in to change notification settings - Fork 43
Use cases: sending commands
Bjorn Svensson edited this page Jan 29, 2021
·
14 revisions
A command that should be handled by a single node, owning the slot that represent the key.
Examples:
SET key val
GET key
EVAL script numkeys key [key ...] arg [arg ...]
Command that contain multiple keys that might be handled by multiple nodes. The responses from nodes could be different.
Examples:
MSET key value [key value ...]
DEL key [key ...]
EXISTS key [key ...]
Command that contain multiple keys but should not be handled by multiple nodes.
Examples:
EVAL script numkeys key [key ...] arg [arg ...]
MSETNX key value [key value ...]
Examples:
SCRIPT LOAD script
DBSIZE
Examples:
SCAN cursor [MATCH pattern] [COUNT count] [TYPE type]
MULTI
EXEC
Examples:
PUBLISH channel message (?, or all, or any, or given)
SUBSCRIBE channel [channel ...] (?, or all, or any, or given)
Examples:
READONLY (far-fetched..)