HELLO
HELLO [protover [AUTH username password] [SETNAME clientname]]
- Group
- Connection
- Complexity
- O(1)
- Arity
- -1 (at least 1 words, counting the command name)
- Flags
- fast, no-auth, loading, stale
- HotKV Cloud
- All plans
- On-Premise
- no license needed
HELLO is usually the first command a modern client library sends. It
switches the connection to the protocol version you ask for (2 for RESP2,
3 for RESP3) and replies with a short description of the server. Without
arguments it keeps the current protocol and only returns the description.
The AUTH and SETNAME options let a client log in and name the connection
in the same round trip. They can only follow a protover.
Options
Section titled “Options”| Option | Effect |
|---|---|
protover |
2 or 3. Any other value is refused with NOPROTO unsupported protocol version. |
AUTH username password |
Log in as this ACL user first, as AUTH does. Use default as the user name for a requirepass password. |
SETNAME clientname |
Name the connection, as CLIENT SETNAME does. The name cannot contain spaces or non-printable characters. |
If the server needs a password and the connection is not authenticated,
HELLO without AUTH fails with this error, and the protocol is not
changed:
NOAUTH HELLO must be called with the client already authenticated, otherwise the HELLO <proto> AUTH <user> <pass> option can be used to authenticate the client and select the RESP protocol version at the same timeReturn value
Section titled “Return value”Seven fields: a map in RESP3, a flat array of field and value pairs in RESP2. The reply already uses the protocol you selected.
| Field | Value |
|---|---|
server |
hotkv |
version |
The Redis version HotKV is compatible with (8.4.0). Client libraries choose features by it. The HotKV release is in the hotkv_version field of INFO server. |
proto |
The protocol now in use, 2 or 3. |
id |
The connection id, as CLIENT ID returns it. |
mode |
standalone or cluster. |
role |
master or replica. |
modules |
Always an empty array. HotKV has no module system. |
Other errors: WRONGPASS when AUTH fails, ERR syntax error for an
unknown or incomplete option, and the name error of
CLIENT SETNAME.
Examples
Section titled “Examples”127.0.0.1:6379> HELLO 31# "server" => "hotkv"2# "version" => "8.4.0"3# "proto" => (integer) 34# "id" => (integer) 75# "mode" => "standalone"6# "role" => "master"7# "modules" => (empty array)127.0.0.1:6379> HELLO 2 AUTH default s3cret SETNAME worker-1 1) "server" 2) "hotkv" 3) "version" 4) "8.4.0" 5) "proto" 6) (integer) 2 7) "id" 8) (integer) 7 9) "mode"10) "standalone"11) "role"12) "master"13) "modules"14) (empty array)127.0.0.1:6379> HELLO 4(error) NOPROTO unsupported protocol versionCompatibility
Section titled “Compatibility”Same options and error replies as Redis 7 and Valkey 8. The server field
is hotkv, and modules is always empty. See RESP3 for
how replies differ between the two protocols.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.