配额和限制

本文档介绍了 Memorystore for Valkey 的当前资源容量限制和每分钟 API 请求数配额。

实例限制

Memorystore for Valkey 实施以下用量限制:

限制
每个实例的数据库数 1
每个实例的用量单位 250

客户数量上限

客户端数上限是指每个节点类型的节点可以拥有的最大客户端连接数,而不会出现性能问题。

为确保您不会超出客户端连接数上限,建议您监控 /instance/node/clients/connected_clients 指标。

下表列出了适用于 Memorystore for Valkey 的节点类型,以及每种节点类型可建立的默认和最大客户端连接数。

节点类型 默认的客户端连接数 客户端连接数上限1
shared-core-nano 5,000 5,000
custom-pico 16,000 32000
custom-micro 16,000 32000
custom-mini 16,000 32000
standard-small 16,000 32000
highmem-medium 32000 64,000
highcpu-medium 32000 64,000
standard-large 32000 64,000
highmem-xlarge 64,000 64,000
highmem-2xlarge 64,000 64,000

1 如需了解如何调整客户端连接数上限,请参阅配置实例

实例使用量单位

Memorystore for Valkey 实例的每个项目的实例使用单位数按以下公式计算:

实例使用单位数 =(分片数)*(1 + 副本数)

Memorystore for Valkey 的区域配额限制了您可以在某个区域的所有实例中预配的总用量单位数。

例如,如果您在项目中预配了 3 个实例,每个实例在 us-central1 中有 3 个分片和 1 个副本,那么您将消耗 us-central1 的总区域单位配额中的 18 个单位。

每分钟 API 请求数配额

Memorystore for Valkey API 每分钟请求/操作数的配额如下所示,并可能随时更改:

API 请求配额
每个项目每分钟的创建或删除 Valkey 实例请求数 10
每个项目每分钟的 Valkey 实例请求数 60

创建或删除 Valkey 实例的请求包括:

  • 创建操作 (gcloud memorystore instances create)
  • 删除操作 (gcloud memorystore instances delete)

Memorystore for Valkey API 操作包括:

  • 获取操作 (gcloud memorystore instances describe)
  • 列出操作 (gcloud memorystore instances list)
  • 创建操作 (gcloud memorystore instances create)
  • 删除操作 (gcloud memorystore instances delete)
  • 更新操作 (gcloud rmemorystore instances update)

memorystore.googleapis.com 请求/操作会计入此配额,但 OSS Valkey 协议/命令不会。这些限额适用于每个 Google Cloud 控制台项目,并由使用该项目的所有应用和 IP 地址共享。