Why am I seeing an HTTP 429 response or Too Many Requests error?
GoCanvas rate-limits API requests to preserve system stability.
What is the HTTP 429 error code?
The 429 HTTP response code is a status code indicating the user has sent too many requests to a server within a time-frame.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429 for more information on this web standard.
What Happens If You Are Rate-Limited?
If you are rate-limited, the server will start responding with 429 errors. This will prevent you from making API requests on the rate-limited route until the number of requests is reduced. We recommend that you monitor the response codes and errors, such as 429 errors, for your API requests. Requests that return 429 errors count against rate-limiting, so we recommend you implement a strategy, such as exponential backoff, to reduce your request rate.
Retry with exponential backoff
Your API client probably contains logic to handle failures by simply retrying the request. If that logic is to continuously retry on failure, you can be rate-limited. Instead of continuously retrying on failures, consider using exponential backoff for retries. Exponential backoff exponentially increases the wait time between subsequent retries. For example, the first retry happens after 2 seconds, the second retry happens 4 seconds after the first retry, the third retry happens 8 seconds after second retry, and so on, perhaps until a maximum retry length is reached. The exact logic depends on the language and pattern that you use.