Google Cloud enforces quotas on resource usage for project owners, setting a hard limit on how much of a particular Google Cloud resource your project can use. There are two types of resource usage that we limit with quota:
- Rate quota such as API requests per day. This quota resets after a specified time, such as a minute or a day.
- Allocation quota such as the number of virtual machines or load balancers used by your project. This quota does not reset over time but must be explicitly released when you no longer want to use the resource, for example by deleting a GKE cluster.
Quotas are enforced for a variety of reasons: for example, they protect the community of Google Cloud users by preventing unforeseen spikes in usage. Quotas also help you with resource management: for instance, you can set your own caps on service usage within your Google-provided quota while developing and testing your applications. Each quota limit is expressed in terms of a particular countable resource, from requests per day to an API to the number of load balancers used by your application.
Not all projects have the same quotas for the same services. If you are using a free trial account to explore the platform, for example, you may have very limited quota. Higher quotas for some services are available only after you have enabled billing for your project. As your use of Google Cloud expands over time, your quotas may increase accordingly. You can also request more quota if you need it, and set up monitoring and alerts in Cloud Monitoring to warn you about unusual quota usage behavior or when you're running out of quota.
Your quota limits may be affected by quota overrides applied by the service owner, project owner, or quota administrator; you can learn more about how quota limits are calculated in Service quota model.
This page describes how to work with quotas in your projects, including how to find and modify your existing quota limits, how to request higher quota, and how to monitor quota usage. You can find out how to view other API usage metrics in Monitoring your API usage.
You need the following IAM permissions to view your project quota in the Google Cloud Console or access it programmatically:
resourcemanager.folders.get(if you want to view quota for an entire Folder)
resourcemanager.organizations.get(if you want to view quota for an entire Organization)
To make changes to your project, folder, or organization quota, you also need the following permission:
This permission is included by default for the following roles: Owner, Editor, Quota Administrator, and Service Usage Admin.
Viewing your quota
There are two main ways to view your current quota limits in the Google Cloud Console:
Using the Quotas page, which gives you a list of all your project's quota usage and limits.
Using the console, which gives you quota information for a particular API, including resource usage over time.
Quota limits are also accessible programmatically through the Service Usage API.
In addition, some services offer command line access to quota and resource usage
information. For example, Compute Engine lets you access quota information
You can find out how to monitor your quota usage and how to set quota alerts in the section Monitoring quota metrics.
Viewing all project quotas
To view quotas (quota usage and limits) for all resources in your project, do the following:
- Go to the Cloud Console Quotas page in IAM & admin.
- The Quotas page for your current project is displayed, listing one line item for each type of quota available in each service. If you want to view quotas for a different project, select a project from the projects list, or create a new one.
You can sort and filter the results to find the information you need:
- Use the filters at the top of the page to adjust the list by Service, Limit name, Quota status, Service ID and/or Metric.
- By default the list is sorted by Quota status (with services for each status shown in alphabetical order) to show your most used quota first, helping you see limits that are at risk of being exceeded. You can toggle to show the least used first by selecting the Quota status arrow. You can also sort the list by Service name and Limit name in alphabetical or reverse alphabetical order.
Select an item in the list to view its current limits and usage in the quota panel:
- The Limit value is your current limit for this quota. By default these limits are those imposed by Google: if you want to specify a lower limit, you can find out how to do so in Capping usage. If there is no Google-imposed limit on a given quota, the limit is displayed as Unlimited. Each of the usage values below this shows how close you are to reaching this limit.
- The Current usage value has a slightly different meaning depending on the quota type. For allocation quota, your current usage is simply how much of the resource you're currently using. For per day rate quota, it is the usage so far in the current day. For per minute or per 100 seconds rate quota, it is the average usage in the past 24 hours.
- The 7 days peak value shows peak usage over the last seven days.
For regional or zonal quotas, the quota panel displays these values for each region or zone.
For regional or zonal quotas, you can click All quota in the relevant list item to view a summary page that shows utilisation per region or zone. You can also click a service name in the list to view its more detailed API-specific quota information, as described below.
You can find out more about quotas for a specific service and what they mean in their own documentation: for example, Compute Engine quota is documented in Resource Quotas.
To view more detailed quota information for a particular API, including usage over time, visit the API's quota page in the Cloud Console. Depending on the API, these limits may include requests per day, requests per minute, and requests per minute per user. Some APIs set very low limits until you enable billing on your project.
To view the current limits for a particular API, either:
- Go to the Cloud Console Quotas page, as described above in Viewing all project quotas, and click the service name for the API you're interested in.
- Go to the Cloud Console APIs & Services Dashboard page.
- From the projects list, select a project or create a new one.
- Click the name of the API you're interested in.
- Click Quotas.
The quota names for your chosen API are displayed on the Quotas page. You can expand each quota to see detailed usage over time, as well as your current limit. By default the limits displayed are those imposed by Google: if you want to specify a lower limit, you can find out how to do so in Capping usage. If there is no Google-imposed limit on a given quota, the limit is displayed as Unlimited.
Not all quotas appear on an API-specific quota page. For instance, requests to the Compute Engine API have an API-specific quota page, but this does not include Compute Engine compute resource usage (allocation quota). In addition, if you are using the service in multiple locations, the API-specific quota page doesn't show regional or zonal quota limits and their usage. For a complete list of your project's quota (which also lets you filter by location), see the project Quotas page.
Managing your quota using the Cloud Console
Depending on your resource usage, you may want to adjust your project's quota limits up or down. This section describes how to change your provided quota limits.
Requesting higher quota
You can request a quota change for most billable services with a quota limit, as follows:
- In the Quotas page, use the checkboxes to select one or more quotas to edit, then click EDIT QUOTAS. Billing must be enabled on the project in order to click the checkboxes.
- In the Edit Quotas panel on the right, complete the form with your Name, Email , and Phone details, then click Next.
- In the Edit Quotas panel, select the service to expand the view, then edit the quotas in that service to your requested limit. Click Done.
- Repeat to edit the quotas in each of the selected services.
- A service with an alert icon ( ) has not yet been edited or a field has not been filled in.
- You can add more quotas to edit by selecting them from the list on the left.
- You can remove a service from the Edit Quotas panel by clicking the delete icon ( ).
- When you are done editing quotas, click Submit request.
Google Cloud quota requests are usually processed quickly, within two business days. You should receive an email confirmation for your request from Google Cloud support. Should you need further assistance, you can respond to that email. Note that large quota increases can take a longer time to be approved.
You might want to limit usage of a particular resource by setting your own quota limits. For example, to prevent getting billed for usage beyond the free courtesy usage limits, you can set requests per day caps. The simplest way to cap quota is to edit the limits on the API-specific quota page.
- Go to the quota page in the Cloud Console for the API whose usage you want to cap.
- On the quota line you want to change, click the edit icon ( ), then enter your preferred total quota, up to the limit specified by Google.
- Click Save to save your changes.
If you want to cap quota that doesn't appear on this page, or you want to set a higher limit than the provided maximum, you must edit your limits. Follow the process described in Requesting higher quota.
Managing your quota using the Service Usage API
You can use the Service Usage APIs to limit the quota usage and to get current quota limits, for Google Cloud APIs and services that are managed by Service Usage. For more information about Service Usage, see the following:
- For an overview, see What is Service Usage?
- For an API reference, see APIs and Reference.
- For usage guides, see How-to Guides.
You cannot use the Service Usage API to request a higher quota. For this activity, you must use the Cloud Console.
Monitoring and alerting on quota metrics
In addition to viewing basic quota information in the Cloud Console, Google Cloud lets you monitor quota usage, limits and errors in greater depth using the Cloud Monitoring API and UI, with quota metrics appearing in the Metrics Explorer. You can then use these metrics to create custom dashboards and alerts, letting you monitor quota usage over time and receive alerts when, for example, you are near a quota limit.
Cloud Monitoring supports a wide variety of metrics, which you can combine
with filters and aggregations for new and insightful views into your quota usage.
For example, you can combine an allocation quota usage count metric with a
quota_metric filter on Cloud TPU names.
To view the metrics for a monitored resource using Metrics Explorer, do the following:
- In the Google Cloud Console navigation pane, select Monitoring:
Go to Google Cloud Console
If this is the first access of Cloud Monitoring for this Google Cloud project, then Cloud Monitoring creates a Workspace. Typically, this process is automatic and completes within a few minutes. If prompted to either select a Workspace or to create a Workspace, select create.
- In the Monitoring navigation pane, click Metrics Explorer.
- Ensure Metric is the selected tab.
- Click in the box labeled
Find resource type and metric, and then select from the menu or
enter the name for the resource and metric. Use the following information to complete the
fields for this text box:
- For the Resource, select or enter Consumer Quota.
- For the Metric, select or enter Allocation quota usage monitor quota for allocation. Select or enter Rate quota usage to monitor rate quota.
- Use the Filter, Group By, and Aggregator menus to modify how the data is displayed. For example, you can group by resource or metric labels. For more information, see Selecting metrics.
Similarly, to see quota limits or exceeded errors, first select Consumer Quota as the resource type and then select Quota limit or Quota exceeded error.
After you've found the quota usage information you want, you can use Cloud Monitoring to create custom dashboards and alerts that will help you continue to monitor and maintain a robust application. You can find out how to do this in the following pages:
See Using quota metrics in the Cloud Monitoring documentation to find out more, with examples of common quota-specific alerting policies.
You can find a detailed reference for quota metrics in the Cloud Monitoring reference guide.
If your project exceeds a particular quota while using a service, the platform will return an error.
In general, Google Cloud will return a HTTP
429 error code if you're using HTTP/REST to
access the service, or
ResourceExhausted if you're using gRPC.
How this error appears to you is service-dependent.
If you're using Cloud Monitoring, you can use it to identify the quota associated with the error and then create custom alerts upon getting a quota error, as described in Monitoring quota metrics.