RESP compatibility with Redis Enterprise
Redis Enterprise supports RESP2 and RESP3.
RESP (Redis Serialization Protocol) is the protocol that clients use to communicate with Redis databases. See the RESP protocol specification for more information.
Supported RESP versions
-
RESP2 is supported by all Redis Enterprise versions.
-
RESP3 is supported by Redis Enterprise 7.2 and later.
Enable RESP3 for a database
To use RESP3 with a Redis Enterprise Software database:
-
Upgrade Redis servers to version 7.2 or later.
For Active-Active and Replica Of databases:
-
Upgrade all participating clusters to Redis Enterprise version 7.2.x or later.
-
Upgrade all databases to version 7.x or later.
-
-
Enable RESP3 support for your database (
enabled
by default):-
rladmin tune db db:<ID> resp3 enabled
You can use the database name in place of
db:<ID>
in the preceding command. -
Update database configuration REST API request:
PUT /v1/bdbs/<uid> { "resp3": true }
-
Deactivate RESP3 for a database
To deactivate RESP3 support for a database:
-
rladmin tune db db:<ID> resp3 disabled
You can use the database name in place of
db:<ID>
in the preceding command. -
Update database configuration REST API request:
PUT /v1/bdbs/<uid> { "resp3": false }
When RESP3 is deactivated, connected clients that use RESP3 are disconnected from the database.
Change default RESP3 option
The cluster-wide option resp3_default
determines the default value of the resp3
option, which enables or deactivates RESP3 for a database, upon upgrading a database to version 7.2. resp3_default
is set to enabled
by default.
To change resp3_default
to disabled
, use one of the following methods:
-
Cluster Manager UI:
-
rladmin tune cluster resp3_default disabled
-
Update cluster policy REST API request:
PUT /v1/cluster/policy { "resp3_default": false }
Client prerequisites for Redis 7.2 upgrade
The Redis clients Go-Redis version 9 and Lettuce versions 6 and later use RESP3 by default. If you use either client to run Redis Stack commands, you should set the client's protocol version to RESP2 before upgrading your database to Redis version 7.2 to prevent potential application issues due to RESP3 breaking changes.
Go-Redis
For applications using Go-Redis v9.0.5 or later, set the protocol version to RESP2:
client := redis.NewClient(&redis.Options{
Addr: "<database_endpoint>",
Protocol: 2, // Pin the protocol version
})
Lettuce
To set the protocol version to RESP2 with Lettuce v6 or later:
import io.lettuce.core.*;
import io.lettuce.core.api.*;
import io.lettuce.core.protocol.ProtocolVersion;
// ...
RedisClient client = RedisClient.create("<database_endpoint>");
client.setOptions(ClientOptions.builder()
.protocolVersion(ProtocolVersion.RESP2) // Pin the protocol version
.build());
// ...
If you are using LettuceMod, you need to upgrade to v3.6.0.