配额和限制
本文档列出了适用于 Service Directory 的配额和系统限制。
- 配额用于指定您可以使用的可计数共享资源的数量。配额由 Service Directory 等 Trusted Cloud by S3NS 服务定义。
- 系统限制是无法更改的固定值。
如需更改配额,请参阅申请额外的配额。
Trusted Cloud by S3NS 使用配额来帮助确保公平性并减少资源使用和可用性的激增。配额用于限制您的 Trusted Cloud 项目可使用的Trusted Cloud 资源的数量。配额适用于一系列资源类型,包括硬件、软件和网络组件。例如,配额可以限制对某项服务的 API 调用次数、您的项目并发使用的负载均衡器数量或者您可以创建的项目数量。配额可以防止服务过载,从而保护Trusted Cloud 用户社区。配额还可以帮助您管理自己的 Trusted Cloud 资源。
Cloud 配额系统执行以下操作:
在大多数情况下,当您尝试消耗的资源超出其配额允许的范围时,系统会阻止对资源的访问,并且您尝试执行的任务会失败。
配额通常在 Trusted Cloud 项目级层应用。您在一个项目中使用资源不会影响您在另一个项目中的可用配额。在 Trusted Cloud 项目中,配额在所有应用和 IP 地址间共享。
Service Directory 资源也有系统限制。系统限制不能更改。
配额
Service Directory 的配额如下:
- 每个区域每个项目的命名空间数量
- 每个命名空间的服务数量
- 每项服务的端点数量
- 每个区域每分钟的注册请求数
- 每个区域每分钟的查找请求数
您可以在配额页面上查看现有的配额和用量。
限制
Service Directory 的一般限制:
- 没有端点的健康状况或健康检查。有两个备选方式:
- 使用内部负载均衡器进行集成式健康检查,并向 Service Directory 注册该负载均衡器。
- 将各个端点的运行状况作为端点注释存储在 Service Directory 中。
Cloud DNS 集成限制:
- Cloud DNS 集成仅处理地址为有效 IPv4 或 IPv6 地址的端点。所有没有有效 IP 地址的已注册端点都会被 DNS 请求忽略。
- SRV 记录不能自定义。符号服务、协议、TTL、权重及优先级由 Service Directory 管理。
- DNS 请求不提供服务和端点注解。如果您的服务需要使用自定义注解,则应使用 Service Directory 中的 HTTP 支持。
- 您不能将资源记录添加到 Service Directory 可用区中。只允许添加从现有的 Service Directory 端点内部生成的资源记录。
管理配额
出于各种原因,Service Directory 会对资源用量实施配额限制。例如,配额可避免出现意料之外的用量突增,从而为 Trusted Cloud by S3NS 用户社区提供保护。配额还可帮助正在通过免费层级探索 Trusted Cloud 的用户避免中断试用。
所有项目在开始时都具有相同的配额,您可以通过申请更多配额来进行更改。根据您使用产品的情况,一些配额可能会自动增加。
权限
如需查看配额或申请增加配额,Identity and Access Management (IAM) 主账号需要具备以下某个角色:
任务 |
所需角色 |
检查项目的配额 |
以下之一:
|
修改配额,申请更多配额 |
以下之一:- Project Owner (
roles/owner )
- Project Editor (
roles/editor )
- Quota Administrator (
roles/servicemanagement.quotaAdmin )
- 具有
serviceusage.quotas.update 权限的自定义角色
|
查看您的配额
控制台
- 在 Trusted Cloud 控制台中,进入配额页面。
转到“配额”
- 如需搜索要更新的配额,请使用过滤表。
如果您不知道配额的名称,请使用此页面上的链接。
gcloud
使用 Google Cloud CLI 运行以下命令来查看您的配额。请将 PROJECT_ID
替换为您自己的项目 ID。
gcloud compute project-info describe --project PROJECT_ID
如需查看您在某一区域中已使用的配额,请运行以下命令:
gcloud compute regions describe example-region
超出配额时引发的错误
如果在发出 gcloud
命令时超过了配额,gcloud
会显示一条 quota exceeded
错误消息,并返回退出代码 1
。
如果在发出 API 请求时超出了配额, Trusted Cloud 会返回以下 HTTP 状态代码:413 Request Entity Too Large
。
申请更多配额
如需调整大多数配额,请使用 Trusted Cloud 控制台。如需了解详情,请参阅申请配额调整。
资源可用性
每个配额代表您可以创建的特定类型资源的数量上限(如果该资源可用)。必须要注意的是,配额无法保证资源可用性。即使您具有可用配额,如果新资源不可用,您也无法创建新资源。
例如,您的配额可能足以在给定区域中创建新的区域级外部 IP 地址。但是,如果该区域中没有可用的外部 IP 地址,则无法执行此操作。可用区级资源可用性也会影响您能否创建新资源。
导致资源在整个区域不可用的情况非常罕见。但是,可用区内的资源有时可能会耗尽。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-19。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-19。"],[],[],null,["# Quotas and limits\n\nThis document lists the quotas and system limits that apply to\nService Directory.\n\n- *Quotas* specify the amount of a countable, shared resource that you can use. Quotas are defined by Google Cloud services such as Service Directory.\n- *System limits* are fixed values that cannot be changed.\n\nTo change a quota, see\n[requesting additional quota](#requesting-additional-quota).\n\nGoogle Cloud uses quotas to help ensure fairness and reduce\nspikes in resource use and availability. A quota restricts how much of a\nGoogle Cloud resource your Google Cloud project can use. Quotas\napply to a range of resource types, including hardware, software, and network\ncomponents. For example, quotas can restrict the number of API calls to a\nservice, the number of load balancers used concurrently by your project, or the\nnumber of projects that you can create. Quotas protect the community of\nGoogle Cloud users by preventing the overloading of services. Quotas also\nhelp you to manage your own Google Cloud resources.\n\nThe Cloud Quotas system does the following:\n\n- Monitors your consumption of Google Cloud products and services\n- Restricts your consumption of those resources\n- Provides a way to [request changes to the quota value](/docs/quotas/help/request_increase) and [automate quota adjustments](/docs/quotas/quota-adjuster)\n\nIn most cases, when you attempt to consume more of a resource than its quota\nallows, the system blocks access to the resource, and the task that\nyou're trying to perform fails.\n\nQuotas generally apply at the Google Cloud project\nlevel. Your use of a resource in one project doesn't affect\nyour available quota in another project. Within a Google Cloud project, quotas\nare shared across all applications and IP addresses.\n\n\nThere are also *system limits* on Service Directory resources.\nSystem limits can't be changed.\n\nQuotas\n------\n\nService Directory has the following quotas:\n\n- Namespaces per project per region\n- Services per namespace\n- Endpoints per service\n- Registration requests per minute per region\n- Lookup requests per minute per region\n\nYou can see your existing quotas and usage on the\n[**Quotas** page](https://console.cloud.google.com/iam-admin/quotas?service=servicedirectory.googleapis.com).\n\nLimits\n------\n\nGeneral Service Directory limitations:\n\n- There is no health-status or health-checking for endpoints. There are two alternatives:\n - Use internal load balancers for integrated health checking, and register the load balancer with Service Directory.\n - Store individual endpoint health status as endpoint annotations in Service Directory.\n\nCloud DNS integration limits:\n\n- The Cloud DNS integration only serves endpoints that are a valid IPv4 or IPv6 address. Any endpoints that are registered that do not have a valid IP address are ignored by DNS requests.\n- SRV records cannot be customized. The symbolic service, protocol, TTL, weight, and priority are managed by Service Directory.\n- Service and endpoint annotations are not served in DNS requests. If your service needs to make use of custom annotations, it should use HTTP support in Service Directory.\n- You cannot add resource records to the Service Directory zone. Only resource records generated internally from existing Service Directory endpoints are allowed.\n\nManage quotas\n-------------\n\nService Directory enforces quotas on resource usage for various reasons.\nFor example, quotas protect the community of Google Cloud users by\npreventing unforeseen spikes in usage. Quotas also help users who are exploring\nGoogle Cloud with the\n[free tier](/free/docs/gcp-free-tier)\nto stay within their trial.\n\nAll projects start with the same quotas, which you can change by\n[requesting additional quota](#requesting-additional-quota). Some quotas might increase\nautomatically based on your use of a product.\n\n### Permissions\n\nTo view quotas or request quota increases, Identity and Access Management (IAM) principals need one of the\nfollowing roles.\n\n### Check your quota\n\n### Console\n\n1. In the Google Cloud console, go to the **Quotas** page.\n\n [Go to Quotas](https://console.cloud.google.com/iam-admin/quotas)\n2. 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.\n\n### gcloud\n\nUsing the Google Cloud CLI, run the following command to\ncheck your quotas. Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with your own project ID. \n\n```\n gcloud compute project-info describe --project PROJECT_ID\n```\n\nTo check your used quota in a region, run the following command: \n\n```\n gcloud compute regions describe example-region\n \n```\n\n### Errors when exceeding your quota\n\nIf you exceed a quota with a `gcloud` command,\n`gcloud` outputs a `quota exceeded` error\nmessage and returns with the exit code `1`.\n\nIf you exceed a quota with an API request, Google Cloud returns the\nfollowing HTTP status code: `413 Request Entity Too Large`.\n\n### Request additional quota\n\nTo adjust most quotas, use the Google Cloud console.\nFor more information, see\n[Request a quota adjustment](/docs/quotas/help/request_increase).\n\n### Resource availability\n\nEach quota represents a maximum number for a particular type of resource that you can create,\nif that resource is available. It's important to note that quotas *don't*\nguarantee resource availability. Even if you have available quota, you can't create\na new resource if it is not available.\n\nFor example, you might have sufficient quota to create a new regional, external IP address\nin a given region. However, that is not possible if there are no\navailable external IP addresses in that region. Zonal resource\navailability can also affect your ability to create a new resource.\n\nSituations where resources are unavailable in an entire region are rare. However, resources\nwithin a zone can be depleted from time to time, typically without impact to the service level\nagreement (SLA) for the type of resource. For more information, review the relevant SLA for the\nresource."]]