An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
Hi @Ninave, Durgesh (Contractor) Thank you for your detailed questions regarding the Azure Monitor Metrics Batch API, metrics:getBatch, using API version 2023-10-01.
We understand that you would like Microsoft to confirm the request-rate limit, the scope at which throttling is enforced, whether regional endpoints or multiple service principals receive independent quotas, and whether the API exposes remaining-quota information.
Based on the currently published Microsoft documentation, the Metrics Batch API can return HTTP 529 when the Azure Monitor Metrics backend is throttling requests. Microsoft recommends implementing an exponential-backoff retry mechanism for this response. However, the public documentation does not currently specify a fixed numeric request-rate limit or define whether throttling is enforced per service principal, subscription, region, or another scope.
- Request-rate limit Microsoft does not currently publish a fixed numeric request-rate limit for the
metrics:getBatchAPI. Therefore, we cannot confirm values such as 360,000 calls per hour or 3,000 requests per 30 seconds as documented service limits. - Scope of throttling The public documentation does not define whether the Metrics Batch throttling scope is per service principal, subscription, tenant, region, subscription and region, or another backend scope.
- Regional endpoints The API uses a regional endpoint, and resources included in one request must belong to the same subscription, Azure region, and resource type. However, the documentation does not confirm whether each regional endpoint receives an independent throttling quota.
- Multiple service principals Microsoft documentation does not confirm that separate service principals receive independent Metrics Batch throttling quotas. We therefore do not recommend relying on multiple app registrations as a guaranteed method of increasing API capacity without further product-team confirmation.
- Throttling responses and headers The Metrics Batch documentation specifically identifies HTTP 529 as an indication that the Metrics backend is throttling requests and recommends exponential backoff. It does not document a Metrics Batch-specific response header or metric that reports the remaining data-plane quota. The client should implement bounded exponential backoff with jitter for 529 responses. If a
Retry-Afterheader is returned, the client should honor it. The client may also defensively handle HTTP 429 as retryable, although the published Metrics Batch guidance specifically identifies HTTP 529.
Recommended mitigation:
To reduce the likelihood and impact of throttling, we recommend the following:
- Include up to 50 unique resource IDs in each request wherever possible. All resources in a batch must be in the same subscription, Azure region, and resource type.
- Implement bounded exponential backoff with jitter for HTTP 529 responses.
- Honor the
Retry-Afterresponse header if the service returns one. - Spread requests over time and avoid sending large bursts at fixed intervals, such as at the start of every minute.
- Limit concurrent requests and gradually adjust concurrency based on successful responses and observed throttling.
- Log the HTTP status code, response headers, regional endpoint, subscription ID, request timestamp, resource count, retry count, and available correlation or trace ID for further analysis.
- After implementing these mitigations, monitor whether the frequency of 529 responses decreases.
If you have further questions regarding this answer, feel free to click "Comment". If you find the answer helpful, please click "upvote" and accept it. This helps the community by allowing others with similar queries to easily find the solution.