Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

CLIENT ID

Last updated
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.

The id as an integer, in RESP2 and RESP3.

127.0.0.1:6379> CLIENT ID
(integer) 12

Same as Redis 7 and Valkey 8.

CLIENT INFO, CLIENT LIST, CLIENT KILL, CLIENT UNBLOCK