Content Delivery API > Technical Limits

    Technical Limits

    Our shared-service infrastructure is built to maintain steady performance for every customer, thanks to carefully set technical limits. If any API call or CMS action goes over these boundaries, it'll trigger an error message. Should your project require higher limits, get in touch with us to discuss further.

    Here are the technical limits currently in place for the CDA:

    • GraphQL complexity cost: 10,000,000 (read more)

    • Real-time Updates API: max. 500 concurrent connections per project (read more)

    Rate limits

    API Rate limits specify the number of requests a client in a specific time frame.

    Since this API is meant to be used for delivering content from DatoCMS to apps, websites and other digital products consumed by end-users, there are no rate-limits enforced on requests that hit our CDN cache. The calls will still count against the monthly quota, even if cached.

    For requests that do hit the Content Delivery API we enforce a rate limit of 40 requests per second and 1,000 requests per minute per API token. When these limits are exceeded, the API will respond with a status code of 429.

    429 Status Responses in Shared Infrastructure

    Even if you're operating within your rate limits, there's still a chance of encountering a 429 status code while using the DatoCMS shared infrastructure or medium-density infrastructure during peak system load.

    Although this is uncommon, it's wise to be proactive in dealing with this situation. To handle it effectively, it's recommended to implement a retry mechanism. If you receive a 429 status response, wait for a few seconds before attempting the request again.

    Cache gets invalidated selectively based on the objects referenced in the query and the payload. As a rule of thumb, when you update a specific model/record/asset, all GraphQL queries that reference those object will get invalidated. Each PoP will then make new requests to the Content Delivery API, and cache the new result for future requests.

    CDN Caching limitations for extremely large requests

    If the body of your GraphQL request, after being compressed using gzip, exceeds 8KB in size, it will not be cached by our CDN. Consequently, these queries will be directed to the Content Delivery API origin servers, resulting in slower performance and being subjected to the rate limits mentioned above.

    Each CDA response contains two headers that might be helpful to understand if the query is within these limits:

    • X-Cacheable-On-Cdn:  indicates whether the request can be cached by our CDN (either true or false)

    • X-Cacheable-On-Cdn-Query-Length-Limit: provides the actual size of the compressed body request in bytes (e.g. 273/8192)

    The efficiency of the gzip compression algorithm makes it highly unlikely that requests will exceed the 8KB limit. To give a rough estimate, 99% of our customers will never experience this limitation. However, it is important to be aware of this limitation and check the GraphQL queries if you notice a suspicious number of 429 status codes.

    Reaching your plan monthly API calls limit

    For projects under a paid plan, even exceeding the API calls or bandwidth limit does not lead to the interruption of the service, but the payment of an additional fee commensurate with the use. For projects under a free plan, service will be temporarily disabled until the beginning of the following calendar month, unless you provide a credit card.

    For more details, check our Plans, billing and pricing page.