BOOK A DEMO
LOGIN
Homekeyboard_arrow_rightDocumentationkeyboard_arrow_rightVersion 3keyboard_arrow_rightExponential Backoff

Exponential Backoff

Exponential backoff is a standard algorithm that helps applications define a retry strategy for consuming a network service. This document outlines situations pertaining to Copyleaks server return error message:

  • Error code 503: Service Unavailable. Typically, this error will appear when Copyleaks is undergoing a maintenance period. You can be notified for these events using https://status.copyleaks.com by subscribing to alerts. We broadcast a message days prior to the event time so users will be able to make preparations in advance.
  • Error code 5xx: Internal errors. There is an issue pertaining to Copyleaks’ service and\or the network.
  • Error code 429: Too many requests. Copyleaks, like other REST API services, has a rate limit policy that defines the maximum calls that can be made. Exceeding the maximum calls repeatedly will lead to temporary/permanent blocks.

The Algorithm

For these errors, we recommend implementing a retry algorithm by doing the following:

  1. Make a request to Copyleaks API.
  2. If the requests fail, wait 1 + rand_seconds_number seconds. Then, retry.
  3. If the requests fail, wait 2 + rand_seconds_number seconds. Then, retry.
  4. If the requests fail, wait 4 + rand_seconds_number seconds. Then, retry.
  5. If the requests fail, wait 8 + rand_seconds_number seconds. Then, retry.
  6. ...
  7. And so on, up to max_time seconds.
  8. Wait max_time and retry.
  9. …

Definitions:

rand_seconds_number - Is a random number with a value between 1 to 10.
max_time - Is the maximum number of seconds to wait. Wait up to 64 seconds.

To ensure superior API performance that consumes reasonable resources for both the user and Copyleaks, users must use Copyleaks’ advanced retry protocol.

stack-overflow_icon.png

Do you have a technical question?

Use stackoverflow.com to get help from our development team and other Copyleaks users.

Ask a Question

PRODUCTS

Scans
Pricing
Copyleaks.com

RESOURCES

Documentation
Plagiarism Report
Help Center
System Status
Security

ABOUT

About us
Careers
Terms of Use
Privacy Policy
Sitemap

Copyleaks, Inc.

700 Canal St.
Stamford, CT 06902 USA

[email protected]

Copyleaks, Inc. All rights reserved. Use of this website signifies your agreement to the Terms of Use.