CLIENT ID
CLIENT ID
- Group
- Connection
- Complexity
- O(1)
- Arity
- 2 (exactly, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
CLIENT ID returns the id of the current connection. Ids are unique for the
life of the server process and grow with every new connection, so a larger
id means a newer connection. The same id appears as id= in
CLIENT LIST, in the id field of
HELLO, and is what CLIENT KILL
ID and CLIENT UNBLOCK take.
Return value
Section titled “Return value”The id as an integer, in RESP2 and RESP3.
Examples
Section titled “Examples”127.0.0.1:6379> CLIENT ID(integer) 12Compatibility
Section titled “Compatibility”Same as Redis 7 and Valkey 8.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.