You need to enable JavaScript to run this app.
Cache for Redis

Cache for Redis

Copy page
Download PDF
Development reference (Data plane)
Switching to RESP3 protocol
Copy page
Download PDF
Switching to RESP3 protocol
By default, Cache for Redis instances use the RESP2 protocol after creation. You can switch to the RESP3 protocol using the HELLO command.​
Background information​
The Redis serialization protocol (RESP) is a protocol for communication between Redis clients and Redis databases. It has the characteristics of easy recognition, simple implementation process, and strong parsing performance. It can serialize different data types such as integers, strings, and arrays, and has specific types for errors. The client sends requests to the Redis server in the form of a string array. The array content includes commands to be executed by the server and corresponding parameters. The data type returned by the server is determined by the specific command. RESP is binary-safe, using prefix lengths to transmit bulk data without processing bulk data transferred between processes. For more details about the Redis serialization protocol, refer to Redis serialization protocol specification.​
Prerequisite​
  • To switch to the RESP3 protocol, your Redis instance version must meet the following requirements:​
  • The database version must be Redis 6.0 or 7.0.​
  • The minor version of proxy must be greater than or equal to 1.502.0.​
tip​
You can view the instance's database version and minor version information under the Summary tab. For specific procedures, refer to Viewing instance information.​
  • Redis clients need to support the RESP3 protocol.​
Precautions​
Switching to the RESP3 protocol using the HELLO command only takes effect on the current connection. New connections still use the RESP2 protocol by default.​
Switching to RESP3 protocol using HELLO command​
In the client command that has successfully connected to the Redis instance, enter the following command to switch the communication protocol to RESP3.​
tip​
You can select a suitable tool to connect to the Redis instance according to the business scenario. For specific procedure, refer to:​
​
Hello 3​
​
When you see "proto" => (integer) 3 in the returned result, it indicates that the current connection has been successfully switched to the RESP3 protocol. For more details about returned results, refer to Client handshake.​
​​​
Last updated: 2025.11.10 16:11:10