本文档列出了适用于 Cloud DNS 的配额和系统限制。
- 配额具有默认值,但您通常可以申请调整。
- 系统限制是无法更改的固定值。
Google Cloud 使用配额来帮助确保公平性并减少资源使用和可用性的激增。配额用于限制您的 Google Cloud 项目可使用多少Google Cloud 资源。配额适用于一系列资源类型,包括硬件、软件和网络组件。例如,配额可以限制对某项服务的 API 调用次数、您的项目并发使用的负载均衡器数量或者您可以创建的项目数量。配额可以防止服务过载,从而保护Google Cloud 用户社区。配额还可以帮助您管理自己的 Google Cloud 资源。
Cloud 配额系统执行以下操作:
在大多数情况下,当您尝试消耗的资源超出其配额允许的范围时,系统会阻止对资源的访问,并且您尝试执行的任务会失败。
配额通常在 Google Cloud 项目级别应用。您在一个项目中使用资源不会影响您在另一个项目中的可用配额。在 Google Cloud 项目中,配额在所有应用和 IP 地址间共享。
如需了解详情,请参阅 Cloud 配额概览。
Cloud DNS 资源也有系统限制。系统限制不能更改。
配额
如需更改配额,请参阅申请额外的配额。
下表重点介绍了每个项目的 Cloud DNS 资源的重要全球配额。如需了解其他配额,请参阅 Google Cloud 控制台中的配额页面。
| 项 | 说明 |
|---|---|
| 一个区域每分钟的读取限制 | 每个 IAM 用户在一分钟时间内可向 Cloud DNS API 发出的 API 请求数上限。此配额仅适用于 API 调用。DNS 查询处理没有配额。 |
| 每个托管区域的 DNSSEC 密钥数 | 每个托管区域的 DNSSEC 密钥数量上限。 |
| 每个项目的托管区域数 | 项目中允许的托管区域数上限。 |
| 每个 VPC 网络的托管区域数 | 可连接到 VPC 网络的托管区域数量上限。 |
| 每个项目的政策资源数量 | 每个项目的 DNS 服务器政策数量上限。 |
| 每项响应政策的网络数 | 每项响应政策允许的 VPC 网络数上限。 |
| 每个项目的互联网健康检查路由政策数量 | 每个项目允许的互联网健康检查 DNS 路由政策数量上限。 |
| 每个路由政策的项数 | 每项路由政策允许的项数上限。 |
| 每个托管式区域的 GKE 集群数量 | 可将专用范围的区域连接到的 Google Kubernetes Engine (GKE) 集群的数量上限。 |
| 每项政策的 GKE 集群数 | 每项政策允许的 GKE 集群数量上限。 |
| 每个 GKE 集群的托管区域数 | 可连接到 GKE 集群的托管区域的数量上限。 |
| 每次更改的资源记录添加数量 | 允许为每个 ChangesCreateRequest 添加的 ResourceRecordSets 数量上限。 |
| 每次更改的资源记录删除数量 | 允许为每个 ChangesCreateRequest 删除的 ResourceRecordSets 数量上限。 |
| 每个托管区域的资源记录集数 | 项目中每个区域允许的 ResourceRecordSets 数量上限。 |
| 每个资源记录集的资源记录数量 | 每个 ResourceRecordSet 允许的 ResourceRecords 的数量上限。每个委派项(NS 类型的资源记录集)最多可包含八个域名服务器。 |
| 每个项目的响应政策数量 | 每个项目允许的响应政策数量上限。 |
| 一个区域每分钟的响应政策规则写入限制 | 每个区域每分钟可写入的响应政策规则数量上限。 |
| 每次批量操作的响应政策规则数 | 每个批次每分钟的响应政策管理操作数上限。 |
| 每个政策的响应政策规则数量 | 您可以为政策创建的响应政策规则数量上限。 |
| 每项转发政策的目标域名服务器数 | 每项转发政策允许的目标域名服务器数量上限。 |
| 每个托管区域的目标域名服务器 | 每个托管转发区域允许的目标域名服务器数量上限。 |
| 每次更改的资源记录集数据总大小(以字节为单位) | 一个 ChangesCreateRequest 中全部 rrdata 允许的大小上限(以字节为单位)。 |
| 每个托管区域的 VPC 网络数 | 可将专用范围区域连接到的 VPC 网络数量上限。 |
| 每项政策的 VPC 网络数 | 每个 Cloud DNS 服务器政策允许的 VPC 网络数量上限。 |
| 一个区域每分钟的写入限制 | 每个区域每分钟的 DNS 写入次数上限。此配额用于创建、修改或删除 DNS 记录的任何写入操作。 |
限制
限制与配额不同,您可以申请增加配额,但一般来说无法提高限制(除非有明确说明)。
API 用量
每天的 API 请求(查询)次数在项目级别进行统计。所有 API 请求都会计入此限制,包括通过 Google Cloud CLI 和 Google Cloud 控制台发出的请求。
资源限制
| 项 | 限制 |
|---|---|
| 如需请求更新这些限制,请与 Cloud Customer Care 联系。 | |
| 每个网络的对等互连可用区的数量 | 1000 |
| 每个委派项的域名服务器数量 | 8 |
| 每次更改的添加操作数量 | 1000 |
| 每次更改的删除操作数量 | 1000 |
| 每次更改的资源记录数据大小 | 10 万字节 |
| 标签组合数 | 1000 |
| 每项响应政策的规则数 | 10000 |
| 每项路由政策的项数 | 100 |
| 绑定到 VPC 网络的托管区域数 | 10000 |
| DNS 响应的大小上限 (UDP) | 1440 个字节 |
| DNS 响应的大小上限 (TCP) | 65533 个字节 |
| 这些限制无法提高。 | |
| 每个区域每个 VPC 网络的查询速率上限 | 某个 Google Cloud 可用区(例如 us-central1-a)内 10 秒 (10s) 时间段内 10 万次查询 |
| 每个 VPC 网络的响应政策数 | 1 |
| 每个代管区域的标签数 | 64 个标签,且每个键/值 128 字节 |
| 转发区域中的转发目标数 | 50 |
| 备用名称服务器中的转发目标数 | 50 |
域名服务器限制
Cloud DNS 会将每个公开代管区域分配给 5 个域名服务器分片中的一个。分片由权威域名服务器名称中数字之前的字母表示,因此从 ns-cloud-e1 到 ns-cloud-e4 都位于 E 分片。
如果某个分片上已经存在以下任一项,则无法将网域的新托管式区域(例如 domain.example.tld)分配给该分片:
- 具有相同 DNS 名称的代管式可用区,例如
domain.example.tld - DNS 名称的子网域,例如
sub.domain.example.tld - DNS 名称的父网域,例如
example.tld
由于存在这些限制,因此以下限制适用于公开的代管式可用区:
- 您最多可以创建五个具有完全相同 DNS 名称的可用区。
- 对于任何父网域,您最多可以创建 5 级子网域。
这些限制适用于 Google Cloud中的所有项目和用户。非委派子网域以及托管在其他 DNS 服务上的委派子网域不计入此限制。在 Cloud DNS 创建占用最后一个可用域名服务器分片的区域之前,您必须使用 TXT 记录验证该区域的网域所有权。
同一父网域的多个子网域(例如 domain.example.tld 和 otherdomain.example.tld)可以分配给同一碎片。但是,Cloud DNS 可能会在考虑限制后选择任何可用的分片。如果在每个碎片中创建此类子网域,则无法为父网域 example.tld 创建可用区。
为避免受到这些限制,请始终先为父网域创建托管区域,然后再为其子网域创建区域。
如果子网域已阻止所有碎片,请按照以下步骤为父网域释放碎片:
- 查看每个子网域区域的域名服务器以确定其分片。
- 查找代管式可用区最少(或最不重要)的碎片 (X)。X
- 将 X 碎片中的可用区导出到其他 DNS 服务,并对可用区委托进行相应更改。X
- 原始委托的 TTL 到期后,请删除碎片 X 子网域的代管式可用区。
- 为父网域创建代管式可用区;它将分配到碎片 X。X
- 恢复删除的子网域代管区域,恢复顺序是先恢复子网域,然后再恢复子网域自己的任何子网域。它们都将存储在新分片中,因此都需要更新委托。
检查限制
您可以运行以下命令来查询项目的限制。下面的示例显示了 my-project 项目中各种类型对象的总限制。totalRrdataSizePerChange 配额以字节为单位,是一次更改的添加操作和删除操作涉及字节数量之和。
gcloud dns project-info describe my-project
虽然这些属于限制,但 Google Cloud 会在内部将其作为配额进行跟踪,因此它们在输出中被标记为配额。
id: my-project,
kind: "dns#project",
number: "123456789012",
quota:
kind: dns#quota,
managedZones: 10000,
resourceRecordsPerRrset: 10000,
rrsetAdditionsPerChange: 3000,
rrsetDeletionsPerChange: 3000,
rrsetsPerManagedZone: 10000,
totalRrdataSizePerChange: 100000,
labelSets: 1000
您可以在 Google Cloud console的首页顶部找到默认项目和其他项目的名称。
Manage quotas
Cloud DNS enforces quotas on resource usage for various reasons. For example, quotas protect the community of Google Cloud users by preventing unforeseen spikes in usage. Quotas also help users who are exploring Google Cloud with the free tier to stay within their trial.
All projects start with the same quotas, which you can change by requesting additional quota. Some quotas might increase automatically based on your use of a product.
Permissions
To view quotas or request quota increases, Identity and Access Management (IAM) principals need one of the following roles.
| Task | Required role |
|---|---|
| Check quotas for a project | One of the following:
|
| Modify quotas, request additional quota | One of the following:
|
Check your quota
Console
- In the Google Cloud console, go to the Quotas page.
- To search for the quota that you want to update, use the Filter table. If you don't know the name of the quota, use the links on this page instead.
gcloud
Using the Google Cloud CLI, run the following command to check your quotas.
ReplacePROJECT_ID with your own project ID.
gcloud dns project-info describe PROJECT_ID
Errors when exceeding your quota
If you exceed a quota with a gcloud command,
gcloud outputs a quota exceeded error
message and returns with the exit code 1.
If you exceed a quota with an API request, Google Cloud returns the
following HTTP status code: 413 Request Entity Too Large.
Request additional quota
To adjust most quotas, use the Google Cloud console. For more information, see Request a quota adjustment.
Console
- In the Google Cloud console, go to the Quotas page.
- On the Quotas page, select the quotas that you want to change.
- At the top of the page, click Edit quotas.
- For Name, enter your name.
- Optional: For Phone, enter a valid phone number.
- Submit your request. Quota requests take 24 to 48 hours to process.
Resource availability
Each quota represents a maximum number for a particular type of resource that you can create, if that resource is available. It's important to note that quotas do not guarantee resource availability. Even if you have available quota, you can't create a new resource if it is not available.
For example, you might have sufficient quota to create a new regional, external IP address
in the us-central1 region. However, that is not possible if there are no
available external IP addresses in that region. Zonal resource
availability can also affect your ability to create a new resource.
Situations where resources are unavailable in an entire region are rare. However, resources within a zone can be depleted from time to time, typically without impact to the service level agreement (SLA) for the type of resource. For more information, review the relevant SLA for the resource.