1. Best practices for developers

Throttling

Sitecore Content Hub backend services apply throttling to provide consistent performance across all services. When the backend is receiving too many requests, it returns responses with the Status code 429 (Too Many Requests).

Note

Throttling is not a license-related limitation.

To optimize your queries to Content Hub:

  • Make sure that a rate limit of 15 calls per second (per API integration user) is respected.

  • Use the WebSDK, which has embedded throttling, over the REST API (for which you have to code the retry mechanism yourself).

  • If required, modify the Content Hub WebSDK built-in retry policy. By default, any call returning an HTTP 429 response is retried nine times. You can modify the RetryCount property of the retry policy as required.

  • Establish a retry after logic when you use the API. Group your requests into batches and take action when you receive an HTTP 429 response.

  • Create dedicated API users for each integration to detect which one is overloading your platform or generating errors. If you have a sizeable integration (with multiple components), divide it into blocks and create a dedicated API user per block.

  • When receiving a 429 response (Too Many Requests), use the Retry-After header to determine how long to wait before retrying. If the header is missing, implement a default wait time, for example 30 seconds, to avoid overwhelming the server with instant retries.

Note

To ensure optimal performance, the following default timeout values define how long connections and requests can remain open. They apply to all REST APIs:

  • API keep-alive timeout - 60 seconds

  • API timeout - 140 seconds

These values define how long connections and individual requests can remain open before they are terminated. They do not represent throttling rate limits.

If you have suggestions for improving this article, let us know!