調整副本數量

本頁說明如何調整執行個體的副本數量。

更新副本數量

只要更新副本數量,即可調度執行個體資源。

控制台

  1. 在 Google Cloud 控制台中,前往「Memorystore for Valkey」頁面。

    Memorystore for Valkey

  2. 按一下要調整資源配置的執行個體 ID。

  3. 捲動至「Configurations」(設定) 部分。

  4. 按一下「Replicas per shard」(每個 shard 的副本數) 欄位旁的「Edit replica count」(編輯副本數量) 圖示 。

  5. 在「Replicas」(副本) 選單中,選取執行個體所需的副本數量。每個 shard 可選取 0 到 5 個副本。

  6. 按一下「更新執行個體」。

gcloud

如要更新副本數量,請使用 gcloud memorystore instances update 指令:

gcloud memorystore instances update INSTANCE_ID \
  --location=REGION_ID \
  --replica-count=REPLICA_COUNT

請依指示取代下列項目:

  • INSTANCE_ID:執行個體的 ID。
  • REGION_ID:執行個體所在的區域。
  • REPLICA_COUNT:執行個體所需的副本數量 (每個 shard)。可接受的值為 0-5。