Skip to main content

Concurrency

Parallelizing Requests to Increase Integration Speed​

When setting up your API client, you can send up to 20 concurrent, asynchronous request calls at once. Inspectorio API Servers can support 20 workers at the same time. Parallelizing your API calls will improve the speed of your data integration significantly. For example:

Scenario A) One request at a time

3,600 requests * 2 seconds per request
= 2 Hours
Scenario B) Parallelizing requests, 20 at a time

3,600 requests / 20 = 180 * 2 seconds per request
= 6 Minutes

If you receive a 429 Too Many Requests response, reduce the number of parallel requests and retry later. See Error codes.

Rate limit headers​

Some endpoints return rate limit information in their 429 response headers:

HeaderDescription
RateLimit-LimitThe maximum number of requests that can be made in a given amount of time.
RateLimit-RemainingThe number of requests remaining in the current rate limit window.
RateLimit-ResetThe number of seconds to wait before making a new request.
Retry-AfterThe number of seconds to wait before making a new request.

When these headers are present, use them to pace your requests instead of retrying immediately.