Concurrency Limits

Concurrency Limits Overview

ICE Mortgage Technology enforces concurrent rate limits, which is a limit on the number of simultaneous API calls that are made at a given time.

Concurrency Limits Illustrated

Concurrency Limit Example
If concurrency limit = 4, then API call 5 will be blocked until one of the 4 calls has been completed.

Each lender has a hard stop limit of concurrent API calls that is set for each Encompass environment/instance. This limit is across all services submitting calls to the given instance, including lender and partner API calls.  The default limit for each lender is set during Encompass instance provisioning.

If the lender's hard stop limit of concurrent API calls is utilized, then all processes (partner and lender initiated calls) are not allowed.

Working with Concurrency Limits

The header of each API response has two concurrency key/value pairs including X-Concurrency-Limit-Limit and X-Concurrency-Limit-Remaining. This information tells the API consumer their allocated concurrency limit, along with the remaining concurrency at the given time.

For lenders and partners that, by the nature of their service and integration, are expected to make a large volume of calls to a lender’s instance (event based services, downloading and uploading large volumes of attachments, use of threading and parallel processing, etc.) it is important to design the integration in a way that ensures that the API caller is able to limit and configure the number of concurrent calls made to a lender’s environment. If the lender's hard stop limit of concurrent API calls is utilized, then all processes (partner and lender initiated calls) are not allowed, a 429 - Too Many Requests status code is returned.  At this point, the lender or any Integration Applications cease to execute. The 429 - Too Many Requests status code will continue to be returned until the concurrency remaining rate is greater then 0.

Best practice is to use an exponential back-off in concurrency violations (the concurrency limit has been reached) and proactive throttling (the available concurrency is outside an acceptable range) and not to exceed 20 percent of the allow Concurrency Limit.

The header of each API response has two concurrency key/value pairs: X-Concurrency-Limit-Limit and X-Concurrency-Limit-Remaining. The Integration Application can use these to calculate the ratio. (X-Concurrency-Limit-Remaining/X-Concurrency-Limit-Limit). If this ratio is 20 percent or more, the Integration Application will need to incorporate a proactive throttling process to increase the X-Concurrency-Limit-Remaining. The ratio can also be a configuration in your Integration Application.