配額與限制
本文列出 Service Directory 適用的配額和系統限制。
- 「配額」會指定您可使用的可計數共用資源數量。配額是由 Trusted Cloud by S3NS 服務 (例如 Service Directory) 定義。
- 系統限制為固定值,無法變更。
如要變更配額,請參閱申請更多配額一節。
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 記錄,符號服務、通訊協定、存留時間、權重和優先順序均由 Service Directory 代管。
- DNS 要求中不含服務和端點註解。如果您的服務需要使用自訂註解,請採用 Service Directory 中的 HTTP 支援。
- 您無法將資源記錄新增至 Service Directory 區域,只能新增在現有 Service Directory 端點內部產生的資源記錄。
管理配額
Service Directory 會基於多種原因,對資源用量實施配額限制。舉例來說,限制配額可以預防用量突然暴增的情況,進而保障 Trusted Cloud by S3NS 使用者社群的權益。採用 Trusted Cloud 免費方案探索的使用者也能透過配額,確保不會超出試用範圍。
所有專案最初的配額均相同,您可以要求額外配額來變更配額數量。某些配額可能會依據您使用產品的狀況而自動增加。
權限
如要查看配額或要求增加配額,身分與存取權管理 (IAM) 主體需要具有下列其中一種角色。
工作 |
必要角色 |
查看專案的配額 |
下列任一項:
- 專案業主 (
roles/owner )
- 專案編輯器 (
roles/editor )
- 配額檢視器 (
roles/servicemanagement.quotaViewer )
|
修改配額,要求額外配額 |
下列任一項:
- 專案業主 (
roles/owner )
- 專案編輯器 (
roles/editor )
- 配額管理員 (
roles/servicemanagement.quotaAdmin )
- 具備
serviceusage.quotas.update 權限的自訂角色
|
查看配額
控制台
- 前往 Trusted Cloud 控制台的「Quotas」(配額) 頁面。
前往「配額」頁面
- 使用篩選表格搜尋要更新的配額。
如果不知道配額名稱,請改用本頁面上的連結。
gcloud
請使用 Google Cloud CLI 執行下列指令,查看配額。使用您自己的專案 ID 替換 PROJECT_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 位址,則無法建立。區域的資源可用性也會影響您建立新資源的能力。
整個區域的資源皆無法提供使用的狀況很罕見。不過,可用區內的資源有時可能會耗盡。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間: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"]],["上次更新時間: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."]]