Resource Provider Guidance Needed for Capacity Exhaustion and Capacity-Constrained Responses
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- api, documentation
Research direction
The issue is about adding guidance to the ARM/RP contract. Start by reviewing the existing Microsoft REST API Guidelines, particularly sections on error handling and HTTP status codes. Look for existing documentation on error codes like 'Throttled' or 'InternalServerError' to understand the current structure. 'Done' means the proposed guidance is integrated into the guidelines, with clear examples for the new error codes and the x-ms-failure-cause mapping.
Written by the indexing model from the issue text.
Description
Description
The Azure ecosystem currently lacks clear, Azure-wide guidance for Resource Providers on how to surface capacity-related failures to customers.
Today, similar capacity constraints are exposed inconsistently across Azure using a mix of:
400 BadRequest409 Conflict429 TooManyRequests500 InternalServerError- RP-specific error codes and semantics
This inconsistency makes it difficult for customers, SDKs, ARM tooling, and dependent Azure services to reliably distinguish between:
- Invalid requests that require customer action
- Resource conflicts
- Request throttling
- Temporary service-side capacity shortages
- Unexpected RP failures
Capacity exhaustion is fundamentally different from both a malformed request and an internal implementation error. A valid request may become satisfiable later without modification, yet there is currently no documented ARM / RP guidance defining the expected HTTP status code, error contract, retry semantics, or failure classification.
Proposal
Add explicit guidance to the ARM / RP contract for temporary capacity shortages.
Recommended response:
503 Service Unavailable
Retry-After: <optional>
x-ms-error-code: InsufficientCapacity
{
"error": {
"code": "InsufficientCapacity",
"message": "The service currently has insufficient capacity to fulfill this request."
}
}
Additionally, define a small set of canonical capacity-related error codes, for example:
InsufficientCapacityRegionalCapacityExceededZonalCapacityExceededSkuCapacityUnavailablePlacementCapacityUnavailable
and document expected retry behavior for each.
x-ms-failure-cause Guidance
Provide explicit guidance for x-ms-failure-cause so capacity shortages can be distinguished from throttling and implementation defects.
| Scenario | HTTP | Error Code | x-ms-failure-cause |
|---|---|---|---|
| Temporary capacity shortage | 503 | InsufficientCapacity | service |
| RP throttling | 429 | Throttled | service |
| ARM throttling | 429 | TooManyRequests | gateway |
| Unexpected RP failure | 500 | InternalServerError | service |
This would allow Azure services and customers to handle capacity conditions consistently across Resource Providers while improving diagnostics, automation, and customer experience.
- Dominant language
- No language data
- Stars
- 23.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/api-guidelines
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
microsoft/api-guidelines#571 ·
-
Difficulty 5/5 Over a week Newbie friendliness 5/100
microsoft/api-guidelines#570 ·
-
Im Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
microsoft/api-guidelines#562 ·
-
Difficulty 5/5 Over a week Newbie friendliness 1/100
microsoft/api-guidelines#560 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 58/100
microsoft/api-guidelines#559 ·
All issues in microsoft/api-guidelines
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
speaches-ai/speaches#678 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Openbug ecr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100