Auth0 SDK's Retry Mechanism on Rate Limit Error of Auth0 Management API

Overview

Many Auth0 SDKs (e.g., node-auth0, auth0-python etc) support using the management API to perform administrative tasks for the tenant.

The Auth0 SDKs make API calls to the management API behind the scenes.

This article describes the Auth0 SDKs' retry mechanism in a scenario where the management API's rate limit is exceeded (429 status is returned).

Applies To
  • Auth0 ADK
  • Auth0 Management API
  • node-auth0 SDK
  • auth0-python SDK
  • auth0-java SDK
  • auth0.net SDK
  • auth0-PHP SDK
  • go-auth0 SDK
Solution

The Auth0 SDKs implement the Exponential Backoff Retry mechanism if the management API rate limit is exceeded (429 status is returned).

Here are the details:

  • By default, 429 responses are retried three times
  • The maximum retries are configurable, between zero and ten. A value of zero results in no retries.
  • Retries are configured with an initial delay of 100ms, using an exponential backoff, up to a maximum of 1 second. A jitter factor of 0.2 is applied.

The retry mechanism is supported/added to the SDK after a specific version. Please check the CHANGELOG of each SDK for the minimum supported version:

Recommended content

No recommended content found...