Skip to content

Commit

Permalink
Merge pull request #2273 from MicrosoftDocs/main
Browse files Browse the repository at this point in the history
1/14/2025 11:00 AM IST Publish
  • Loading branch information
PhilKang0704 authored Jan 14, 2025
2 parents de17d62 + 0185afc commit 505596f
Show file tree
Hide file tree
Showing 22 changed files with 496 additions and 122 deletions.
2 changes: 1 addition & 1 deletion articles/ai-services/document-intelligence/faq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ sections:
- Increase the workload gradually. Avoid sharp changes.
- [Create a support request](service-limits.md#create-and-submit-support-request) to increase transactions per second (TPS) limit.
- [Create a support request](service-limits.md#create-and-submit-support-request-for-tps-increase) to increase transactions per second (TPS) limit.
Learn more about Document Intelligence [service quotas and limits](service-limits.md).
Expand Down
61 changes: 29 additions & 32 deletions articles/ai-services/document-intelligence/service-limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ author: laujan
manager: nitinme
ms.service: azure-ai-document-intelligence
ms.topic: conceptual
ms.date: 11/19/2024
ms.date: 01/13/2025
ms.author: lajanuar
monikerRange: '<=doc-intel-4.0.0'
---
Expand Down Expand Up @@ -64,7 +64,7 @@ Document Intelligence billing is calculated monthly based on the model type and

- Container pricing is the same as cloud service pricing.

- Document Intelligence offers a free tier (F0) where you can test all the Document Intelligence features.
- Document Intelligence offers a free tier (F0) where you can test all the Document Intelligence features. The free tier limits analyze response to only the first two pages in a request.

- Document Intelligence has a commitment-based pricing model for large workloads.

Expand Down Expand Up @@ -93,7 +93,13 @@ Document Intelligence billing is calculated monthly based on the model type and

|Quota|Free (F0)<sup>1</sup>|Standard (S0)|
|--|--|--|
| **Transactions Per Second limit** | 1 | 15 (default value) |
| **Analyze transactions Per Second limit** | 1 | 15 (default value) |
| Adjustable | No | Yes <sup>2</sup> |
| **Get operations Per Second limit** | 1 | 50 (default value) |
| Adjustable | No | Yes <sup>2</sup> |
| **Model management operations Per Second limit** | 1 | 5 (default value) |
| Adjustable | No | Yes <sup>2</sup> |
| **List operations Per Second limit** | 1 | 10 (default value) |
| Adjustable | No | Yes <sup>2</sup> |
| **Max document size** | 4 MB | 500 MB |
| Adjustable | No | No |
Expand Down Expand Up @@ -131,7 +137,7 @@ Document Intelligence billing is calculated monthly based on the model type and
| Adjustable | No | No |
| **Max number of pages (Training) * Neural and Generative** | 50,000 | 50,000 (default value) |
| Adjustable | No | No |
| **Custom neural model train** | 10 hours per month <sup>5</sup> | no limit (pay by the hour) |
| **Custom neural model train** | 10 hours per month <sup>5</sup> | no limit (pay by the hour), start with 10 free hours each month |
| Adjustable | No |Yes <sup>3</sup>|
| **Max number of pages (Training) * Classifier** | 10,000 | 10,000 (default value) |
| Adjustable | No | No |
Expand Down Expand Up @@ -238,9 +244,9 @@ Document Intelligence billing is calculated monthly based on the model type and

::: moniker range=">=doc-intel-2.1.0"

> <sup>1</sup> For **Free (F0)** pricing tier see also monthly allowances at the [pricing page](https://azure.microsoft.com/pricing/details/form-recognizer/).</br>
> <sup>2</sup> See [best practices](#example-of-a-workload-pattern-best-practice), and [adjustment instructions](#create-and-submit-support-request).</br>
> <sup>3</sup> Neural models training count is reset every calendar month. Open a support request to increase the monthly training limit.
> <sup>1</sup> For **Free (F0)** pricing tier see also monthly allowances at the [pricing page](https://azure.microsoft.com/pricing/details/ai-document-intelligence/).</br>
> <sup>2</sup> See [best practices](#example-of-a-workload-pattern-best-practice), and [adjustment instructions](#create-and-submit-support-request-for-tps-increase).</br>
> <sup>3</sup> Neural models training count is reset every calendar month. Open a support request to increase the monthly training limit. Starting with the v4.0 API, training requests over 20 requests in a calendar month are billed on the training tier. See [pricing](https://azure.microsoft.com/pricing/details/ai-document-intelligence/) for details.
::: moniker-end
::: moniker range=">=doc-intel-3.0.0"
> <sup>4</sup> This limit applies to all documents found in your training dataset folder prior to any labeling-related updates.
Expand All @@ -251,49 +257,40 @@ Document Intelligence billing is calculated monthly based on the model type and

## Detailed description, Quota adjustment, and best practices

Before requesting a quota increase (where applicable), ensure that it's necessary. Document Intelligence service uses autoscaling to bring the required computational resources `on-demand`, keep the customer costs low, and deprovision unused resources by not maintaining an excessive amount of hardware capacity.
The default limits can be extended by requesting an increase via a support ticket. Before requesting a quota increase (where applicable), ensure that it's necessary. Document Intelligence service uses autoscaling to bring the required computational resources `on-demand`, keep the customer costs low, and deprovision unused resources by not maintaining an excessive amount of hardware capacity.

If your application returns Response Code 429 (*Too many requests*) and your workload is within the defined limits: most likely, the service is scaling up to your demand, but has yet to reach the required scale. Thus the service doesn't immediately have enough resources to serve the request. This state is transient and shouldn't last long.
If your application returns Response Code 429 (*Too many requests*) you are over the threshold for one or more of the transactions per second limits (TPS):
* **Analyze transactions Per Second limit** The TPS for submitting analyze requests (POST)
* **Get operations Per Second limit** The TPS for polling for results on analyze operations (GET)
* **Model management operations Per Second limit** Operations related to model management like build/train and copy.
* **List operations Per Second limit** Operations related to listing models, operations.

### General best practices to mitigate throttling during autoscaling

To minimize issues related to throttling (Response Code 429), we recommend using the following techniques:

* Implement retry logic in your application
* Avoid sharp changes in the workload. Increase the workload gradually <br/>
*Example.* Your application is using Document Intelligence and your current workload is 10 TPS (transactions per second). The next second you increase the load to 40 TPS (that is four times more). The Service immediately starts scaling up to fulfill the new load, but likely it can't do it within a second, so some of the requests get Response Code 429.
*Example.* Your application is using Document Intelligence and your current workload is 10 TPS (transactions per second). The next second you increase the load to 40 TPS. The result is a 429 response code for some requests as you are over the 15 TPS limit for submitting analyze operations. You could either back off the processing to stay under the 15 TPS or request an increase on the TPS to support your higher volumes.

The next sections describe specific cases of adjusting quotas.
Jump to [Document Intelligence: increasing concurrent request limit](#create-and-submit-support-request)
Jump to [Document Intelligence: increasing concurrent request limit](#create-and-submit-support-request-for-tps-increase)

### Increasing transactions per second request limit

By default the number of transactions per second is limited to 15 transactions per second for a Document Intelligence resource. For the Standard pricing tier, this amount can be increased. Before submitting the request, ensure you're familiar with the material in [this section](#detailed-description-quota-adjustment-and-best-practices) and aware of these [best practices](#example-of-a-workload-pattern-best-practice).

Increasing the Concurrent Request limit does **not** directly affect your costs. Document Intelligence service uses "Pay only for what you use" model. The limit defines how high the Service can scale before it starts throttle your requests.
The fist step would be to enable auto scaling. Follow this document to enable auto scaling on your resource * [enable auto scaling](../../ai-services/autoscale.md). With auto scaling enabled your resource can continue to accept requests over the TPS limits configured if there's capacity on the service. It can still result in request throttled.

Existing value of Concurrent Request limit parameter is **not** visible via Azure portal, Command-Line tools, or API requests. To verify the existing value, create an Azure Support Request.

If you would like to increase your transactions per second, you can enable auto scaling on your resource. Follow this document to enable auto scaling on your resource * [enable auto scaling](../../ai-services/autoscale.md). You can also submit an increase TPS support request.

#### Have the required information ready
Increasing the Concurrent Request limit does **not** directly affect your costs. Document Intelligence service uses "Pay only for what you use" model. The limit defines how high the Service can scale before it starts throttle your requests.

- Document Intelligence Resource ID
- Region
The existing value of different request limit categories is available via Azure portal, under the monitoring tab on the resource overview blade.

- Base model information:
- Sign in to the [Azure portal](https://portal.azure.com)
- Select the Document Intelligence Resource for which you would like to increase the transaction limit
- Select -Properties- (-Resource Management- group)
- Copy and save the values of the following fields:
- Resource ID
- Location (your endpoint Region)

#### Create and submit support request
#### Create and submit support request for TPS increase

Initiate the increase of transactions per second(TPS) limit for your resource by submitting the Support Request:

- Ensure you have the [required information](#have-the-required-information-ready)
- Sign in to the [Azure portal](https://portal.azure.com)
- Select the Document Intelligence Resource for which you would like to increase the TPS limit
- Select -New support request- (-Support + troubleshooting- group). A new window appears with autopopulated information about your Azure Subscription and Azure Resource
Expand All @@ -303,16 +300,16 @@ Initiate the increase of transactions per second(TPS) limit for your resource by
- Proceed further with the request creation
- Enter the following information in the -Description- field, under the Details tab:
- a note, that the request is about Document Intelligence quota.
- Provide a TPS expectation you would like to scale to meet.
- Azure resource information you [collected](#have-the-required-information-ready).
- Provide a TPS expectation you would like to scale to meet. While TPS increases are free, you should only request a TPS that is reasonable for your workload.
- Azure resource information
- Complete entering the required information and select -Create- button in -Review + create- tab
- Note the support request number in Azure portal notifications. Look for Support to contact you shortly for further processing.

## Example of a workload pattern best practice

This example presents the approach we recommend following to mitigate possible request throttling due to [Autoscaling being in progress](#detailed-description-quota-adjustment-and-best-practices). It isn't an *exact recipe*, but merely a template we invite to follow and adjust as necessary.

Let us suppose that a Document Intelligence resource has the default limit set. Start the workload to submit your analyze requests. If you find that you're seeing frequent throttling with response code 429, start by implementing an exponential backoff on the GET analyze response request. By using a progressively longer wait time between retries for consecutive error responses, for example a 2-5-13-34 pattern of delays between requests. In general, we recommended not calling the get analyze response more than once every 2 seconds for a corresponding POST request.
Let us suppose that a Document Intelligence resource has the default limit set. Start the workload to submit your analyze requests. If you find that you're seeing frequent throttling with response code 429 when checking for completion, start by implementing an exponential backoff on the GET analyze response request. By using a progressively longer wait time between retries for consecutive error responses, for example a 2-5-13-34 pattern of delays between requests. In general, we recommended not calling the get analyze response more than once every 2 seconds for a corresponding POST request. The `analyze` response also contains a **retry-after** header that indicates how long you should wait in seconds before checking for completion of that request.

If you find that you're being throttled on the number of POST requests for documents being submitted, consider adding a delay between the requests. If your workload requires a higher degree of concurrent processing, you then need to create a support request to increase your service limits on transactions per second.

Expand All @@ -321,4 +318,4 @@ Generally, we recommended testing the workload and the workload patterns before
## Next steps

> [!div class="nextstepaction"]
> [Learn about error codes and troubleshooting](v3-error-guide.md)
> [Learn about error codes and troubleshooting](v3-error-guide.md)
Loading

0 comments on commit 505596f

Please sign in to comment.