此内容没有您所选择的语言版本。

Chapter 1. Using the RESP endpoint


Data Grid Server includes an experimental module that implements the RESP3 protocol. The RESP endpoint allows Redis clients to connect to one or several Data Grid-backed RESP servers and perform cache operations.

Important

RESP protocol endpoint is available as a technology preview feature.

1.1. Technology Previews

Technology Preview features or capabilities are not supported with Red Hat production service-level agreements (SLAs) and might not be functionally complete.

Red Hat does not recommend using Technology Preview features or capabilities for production. These features provide early access to upcoming product features, which enables you to test functionality and provide feedback during the development process.

For more information, see Red Hat Technology Preview Features Support Scope.

1.2. Enabling the RESP endpoint

Add the resp-connector to Data Grid Server configuration to enable the RESP endpoint. You can enable the RESP endpoint with:

  • Standalone Data Grid Server deployments, exactly like standalone Redis, where each server instance runs independently of each other.
  • Clustered Data Grid Server deployments, where server instances replicate or distribute data between each other. Clustered deployments provides clients with failover capabilities.

Prerequisites

  • Install Data Grid Server.

Procedure

  1. Open your Data Grid Server configuration for editing.
  2. Add cache configuration to the cache-container section if required.

    Cache configuration cannot enable capabilities that violate the RESP protocol. For example, specifying expiration values in a cache for the RESP endpoint results in a fatal error at startup.

    Tip

    Configure your cache with Protobuf encoding if you want to view cache entries in the Data Grid Console (encoding media-type="application/x-protostream").

  3. Add an endpoint declaration to your configuration.
  4. Add the resp-connector element and specify the name of the cache to use with the RESP connector with the cache attribute.

    You can use only one cache with the RESP endpoint.

  5. Declare the security realm to use with the RESP endpoint with the security-realm attribute, if required.
  6. Ensure that the endpoint declaration also adds a Hot Rod and REST connector.
  7. Save the changes to your configuration.

Verification

When you start Data Grid Server check for the following log message:

[org.infinispan.SERVER] ISPN080018: Started connector Resp (internal)
Copy to Clipboard Toggle word wrap

You can now connect to the RESP endpoint with a Redis client. For example, with the Redis CLI you can do the following to add an entry to the cache:

redis-cli -p 11222 --user username --pass password
Copy to Clipboard Toggle word wrap
127.0.0.1:11222> SET k v
OK
127.0.0.1:11222> GET k
"v"
127.0.0.1:11222> quit
Copy to Clipboard Toggle word wrap
RESP endpoint configuration

XML

<endpoints>
  <endpoint socket-binding="default" security-realm="default">
    <resp-connector cache="mycache" />
    <hotrod-connector />
    <rest-connector/>
  </endpoint>
</endpoints>
Copy to Clipboard Toggle word wrap

JSON

{
  "server": {
    "endpoints": {
      "endpoint": {
        "socket-binding": "default",
        "security-realm": "default",
        "resp-connector": {
          "cache": "mycache"
        },
        "hotrod-connector": {},
        "rest-connector": {}
      }
    }
  }
}
Copy to Clipboard Toggle word wrap

YAML

server:
  endpoints:
    endpoint:
      socketBinding: "default"
      securityRealm: "default"
      respConnector:
        cache: "mycache"
      hotrodConnector: ~
      restConnector: ~
Copy to Clipboard Toggle word wrap

1.3. Redis commands

The Data Grid RESP endpoint implements the following Redis commands:

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat