- Usage:
-
CLIENT CAPA capability [ capability ... ]
- Complexity:
- O(1)
- Since:
- 8.0.0
- ACL Categories:
- @connection, @slow
redirect- This indicates that the client is capable of handling redirect messages. When accessing a replica node in standalone mode, if a data operation is performed (read or write commands), Valkey will return-REDIRECT primary-ip:portto this connection. Note that theprimary-ipcan be an IPv6 which itself contains colons, so to properly parse ip and port, a client needs to locate the last colon. Using theREADONLYcommand can enable this connection to execute read commands on the replica node.
Clients can declare their capabilities to Valkey using the CLIENT CAPA command, and Valkey
will adjust the corresponding features for the current connection based on the declared client capabilities.
Multiple capabilities can be declared in the command. If any capabilities are unrecognized, Valkey will ignore them instead of returning an error.
The capabilities currently supported are:
RESP2/RESP3 Reply
Simple string reply: OK.