Azure Digital Twins service limits
The following sections describe the service limits of Azure Digital Twins.
Some areas of this service have adjustable limits. This is represented in the tables below with the Adjustable? column. When the limit can be adjusted, the Adjustable? value is Yes.
If your business requires raising an adjustable limit or quota above the default limit, you can request additional resources by opening a support ticket.
Limits by type
The following table lists the functional limits of Azure Digital Twins.
For modeling recommendations to operate within these functional limits, see Modeling tools and best practices.
|Azure resource||Number of Azure Digital Twins instances in a region, per subscription||10||Yes|
|Digital twins||Number of twins in an Azure Digital Twins instance||2,000,000||Yes|
|Digital twins||Number of incoming relationships to a single twin||5,000||No|
|Digital twins||Number of outgoing relationships from a single twin||5,000||No|
|Digital twins||Maximum size (of JSON body in a PUT or PATCH request) of a single twin||32 KB||No|
|Digital twins||Maximum request payload size||32 KB||No|
|Digital twins||Maximum size of a string property value (UTF-8)||4 KB||No|
|Digital twins||Maximum size of a property name||1 KB||No|
|Routing||Number of endpoints for a single Azure Digital Twins instance||6||No|
|Routing||Number of routes for a single Azure Digital Twins instance||6||Yes|
|Models||Number of models within a single Azure Digital Twins instance||10,000||Yes|
|Models||Number of models that can be uploaded in a single API call||250||No|
|Models||Maximum size (of JSON body in a PUT or PATCH request) of a single model||1 MB||No|
|Models||Number of items returned in a single page||100||No|
|Query||Number of items returned in a single page||1000||Yes|
|Query||Number of array items in an
|Query||Number of characters in a query||8,000||Yes|
The following table reflects the rate limits of different APIs.
|Models API||Number of requests per second||100||Yes|
|Digital Twins API||Number of read requests per second||1,000||Yes|
|Digital Twins API||Number of patch requests per second||1,000||Yes|
|Digital Twins API||Number of create/delete operations per second across all twins and relationships||50||Yes|
|Digital Twins API||Number of create/update/delete operations per second on a single twin or its incoming/outgoing relationships||10||No|
|Digital Twins API||Number of outstanding operations on a single twin or its incoming/outgoing relationships||500||No|
|Query API||Number of requests per second||500||Yes|
|Query API||Query Units per second||4,000||Yes|
|Event Routes API||Number of requests per second||100||Yes|
Limits on data types and fields within DTDL documents for Azure Digital Twins models can be found within its spec documentation in GitHub: Digital Twins Definition Language (DTDL) - version 2.
Working with limits
When a limit is reached, any requests beyond it are throttled by the service, which will result in a 429 error response from these requests.
To manage the throttling, here are some recommendations for working with limits.
- Use retry logic. The Azure Digital Twins SDKs implement retry logic for failed requests, so if you're working with a provided SDK, this functionality is already built-in. Otherwise, consider implementing retry logic in your own application. The service sends back a
Retry-Afterheader in the failure response, which you can use to determine how long to wait before retrying.
- Use thresholds and notifications to warn about approaching limits. Some of the service limits for Azure Digital Twins have corresponding metrics that can be used to track usage in these areas. To configure thresholds and set up an alert on any metric when a threshold is approached, see the instructions in Create a new alert rule. To set up notifications for other limits where metrics aren't provided, consider implementing this logic in your own application code.
- Deploy at scale across multiple instances. Avoid having a single point of failure. Instead of one large graph for your entire deployment, consider sectioning out subsets of twins logically (like by region or tenant) across multiple instances.
Azure Digital Twins will automatically scale resources to meet the rate limits described in this article. You may experience throttling before these limits are reached due to internal scaling to adapt to the incoming load. Internal scaling can take anywhere from 5 to 30 minutes, during which time your application may encounter 429 errors.
Learn more about the current release of Azure Digital Twins in the service overview:
Submit and view feedback for