{
  "schema_version": 2,
  "id": "operate/rs/references/compatibility/resp",
  "title": "RESP compatibility with Redis Software",
  "url": "https://redis.io/docs/latest/operate/rs/references/compatibility/resp/",
  "summary": "Redis Software supports RESP2 and RESP3.",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-10-02T16:06:07+01:00",
  "page_type": "content",
  "content_hash": "9a9c1afcebb732114bee24cad1aef8992711866d89d8c3f0fe9e0be34cc17139",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "RESP (Redis Serialization Protocol) is the protocol that clients use to communicate with Redis databases. See the [RESP protocol specification](https://redis.io/docs/latest/develop/reference/protocol-spec) for more information."
    },
    {
      "id": "supported-resp-versions",
      "title": "Supported RESP versions",
      "role": "compatibility",
      "text": "- RESP2 is supported by all Redis Software versions.\n\n- RESP3 is supported by Redis Software 7.2 and later.\n\n> [!NOTE]\n> Redis Software versions that support RESP3 continue to support RESP2."
    },
    {
      "id": "enable-resp3",
      "title": "Enable RESP3 for a database",
      "role": "content",
      "text": "To use RESP3 with a Redis Software database:\n\n1. Upgrade Redis servers to version 7.2 or later.\n\n    For Active-Active and Replica Of databases:\n \n    1. Upgrade all participating clusters to Redis Software version 7.2.x or later.\n \n    1. Upgrade all databases to version 7.x or later.\n\n1. Enable RESP3 support for your database (`enabled` by default):\n\n    - [`rladmin tune db`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/tune#tune-db):\n\n        [code example]\n\n        You can use the database name in place of `db:<ID>` in the preceding command.\n\n    - [Update database configuration](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs#put-bdbs) REST API request:\n\n        [code example]\n\n ## Deactivate RESP3 for a database {#deactivate-resp3}\n\n To deactivate RESP3 support for a database:\n\n- [`rladmin tune db`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/tune#tune-db):\n\n     [code example]\n\n    You can use the database name in place of `db:<ID>` in the preceding command.\n\n- [Update database configuration](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs#put-bdbs) REST API request:\n\n    [code example]\n\n When RESP3 is deactivated, connected clients that use RESP3 are disconnected from the database.\n\n> [!NOTE]\n> You cannot use sharded pub/sub if you deactivate RESP3 support. When RESP3 is enabled, you can use sharded pub/sub with either RESP2 or RESP3."
    },
    {
      "id": "change-default-resp3-option",
      "title": "Change default RESP3 option",
      "role": "content",
      "text": "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.\n\nTo change `resp3_default` to `disabled`, use one of the following methods:\n\n- Cluster Manager UI:\n\n    1. On the **Databases** screen, select ![Toggle actions button](https://redis.io/docs/latest/images/rs/buttons/button-toggle-actions-vertical.png#no-click) to open a list of additional actions.\n\n    1. Select **Upgrade configuration**.\n\n    1. For **RESP3 support**, select **Disable**.\n\n    1. Click **Save**.\n\n- [`rladmin tune cluster`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster)\n\n    [code example]\n\n- [Update cluster policy](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/cluster/policy#put-cluster-policy) REST API request:\n\n    [code example]"
    },
    {
      "id": "client-prerequisites-for-redis-72-upgrade",
      "title": "Client prerequisites for Redis 7.2 upgrade",
      "role": "content",
      "text": "The Redis clients [Go-Redis](https://redis.uptrace.dev/) version 9 and [Lettuce](https://redis.github.io/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."
    },
    {
      "id": "go-redis",
      "title": "Go-Redis",
      "role": "content",
      "text": "For applications using Go-Redis v9.0.5 or later, set the protocol version to RESP2:\n\n[code example]"
    },
    {
      "id": "lettuce",
      "title": "Lettuce",
      "role": "content",
      "text": "To set the protocol version to RESP2 with Lettuce v6 or later:\n\n[code example]\n\nIf you are using [LettuceMod](https://github.com/redis-developer/lettucemod/), you need to upgrade to [v3.6.0](https://github.com/redis-developer/lettucemod/releases/tag/v3.6.0)."
    }
  ],
  "examples": [
    {
      "id": "enable-resp3-ex0",
      "language": "sh",
      "code": "rladmin tune db db:<ID> resp3 enabled",
      "section_id": "enable-resp3"
    },
    {
      "id": "enable-resp3-ex1",
      "language": "sh",
      "code": "PUT /v1/bdbs/<uid> \n        { \"resp3\": true }",
      "section_id": "enable-resp3"
    },
    {
      "id": "enable-resp3-ex2",
      "language": "sh",
      "code": "rladmin tune db db:<ID> resp3 disabled",
      "section_id": "enable-resp3"
    },
    {
      "id": "enable-resp3-ex3",
      "language": "sh",
      "code": "PUT /v1/bdbs/<uid> \n    { \"resp3\": false }",
      "section_id": "enable-resp3"
    },
    {
      "id": "change-default-resp3-option-ex0",
      "language": "sh",
      "code": "rladmin tune cluster resp3_default disabled",
      "section_id": "change-default-resp3-option"
    },
    {
      "id": "change-default-resp3-option-ex1",
      "language": "sh",
      "code": "PUT /v1/cluster/policy \n    { \"resp3_default\": false }",
      "section_id": "change-default-resp3-option"
    },
    {
      "id": "go-redis-ex0",
      "language": "go",
      "code": "client := redis.NewClient(&redis.Options{\n    Addr:     \"<database_endpoint>\",\n    Protocol: 2, // Pin the protocol version\n})",
      "section_id": "go-redis"
    },
    {
      "id": "lettuce-ex0",
      "language": "java",
      "code": "import io.lettuce.core.*;\nimport io.lettuce.core.api.*;\nimport io.lettuce.core.protocol.ProtocolVersion;\n\n// ...\nRedisClient client = RedisClient.create(\"<database_endpoint>\");\nclient.setOptions(ClientOptions.builder()\n        .protocolVersion(ProtocolVersion.RESP2) // Pin the protocol version \t\n        .build());\n// ...",
      "section_id": "lettuce"
    }
  ]
}
