이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 2. Performing rolling upgrades for Data Grid Server clusters


Perform rolling upgrades of your Data Grid clusters to change between versions without downtime or data loss and migrate data over the Hot Rod protocol.

2.1. Setting up target Data Grid clusters

Create a cluster that uses the Data Grid version to which you plan to upgrade and then connect the source cluster to the target cluster using a remote cache store.

Prerequisites

  • Install Data Grid Server nodes with the desired version for your target cluster.
Important

Ensure the network properties for the target cluster do not overlap with those for the source cluster. You should specify unique names for the target and source clusters in the JGroups transport configuration. Depending on your environment you can also use different network interfaces and port offsets to separate the target and source clusters.

Procedure

  1. Create a remote cache store configuration, in JSON format, that allows the target cluster to connect to the source cluster.

    Remote cache stores on the target cluster use the Hot Rod protocol to retrieve data from the source cluster.

    {
      "remote-store": {
        "cache": "myCache",
        "shared": true,
        "raw-values": true,
        "security": {
          "authentication": {
            "digest": {
              "username": "username",
              "password": "changeme",
              "realm": "default"
            }
          }
        },
        "remote-server": [
          {
            "host": "127.0.0.1",
            "port": 12222
          }
        ]
      }
    }
  2. Use the Data Grid Command Line Interface (CLI) or REST API to add the remote cache store configuration to the target cluster so it can connect to the source cluster.

    • CLI: Use the migrate cluster connect command on the target cluster.

      [//containers/default]> migrate cluster connect -c myCache --file=remote-store.json
    • REST API: Invoke a POST request that includes the remote store configuration in the payload with the rolling-upgrade/source-connection method.

      POST /rest/v2/caches/myCache/rolling-upgrade/source-connection
  3. Repeat the preceding step for each cache that you want to migrate.
  4. Switch clients over to the target cluster, so it starts handling all requests.

    1. Update client configuration with the location of the target cluster.
    2. Restart clients.
Important

If you need to migrate Indexed caches you must first migrate the internal ___protobuf_metadata cache so that the .proto schemas defined on the source cluster will also be present on the target cluster.

2.2. Synchronizing data to target clusters

When you set up a target Data Grid cluster and connect it to a source cluster, the target cluster can handle client requests using a remote cache store and load data on demand. To completely migrate data to the target cluster, so you can decommission the source cluster, you can synchronize data. This operation reads data from the source cluster and writes it to the target cluster. Data migrates to all nodes in the target cluster in parallel, with each node receiving a subset of the data. You must perform the synchronization for each cache that you want to migrate to the target cluster.

Prerequisites

  • Set up a target cluster with the appropriate Data Grid version.

Procedure

  1. Start synchronizing each cache that you want to migrate to the target cluster with the Data Grid Command Line Interface (CLI) or REST API.

    • CLI: Use the migrate cluster synchronize command.

      migrate cluster synchronize -c myCache
    • REST API: Use the ?action=sync-data parameter with a POST request.

      POST /rest/v2/caches/myCache?action=sync-data

      When the operation completes, Data Grid responds with the total number of entries copied to the target cluster.

  2. Disconnect each node in the target cluster from the source cluster.

    • CLI: Use the migrate cluster disconnect command.

      migrate cluster disconnect -c myCache
    • REST API: Invoke a DELETE request.

      DELETE /rest/v2/caches/myCache/rolling-upgrade/source-connection

Next steps

After you synchronize all data from the source cluster, the rolling upgrade process is complete. You can now decommission the source cluster.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.