Third-Party API Failures and Retry Strategies

Third-Party API Failures and Retry Strategies

Your application almost certainly relies on outside services — for payments, maps, email or data. Those services will occasionally be slow or unavailable, and your system has to cope without falling over.

A thoughtful retry strategy keeps your product resilient when the wider internet has a bad day, protecting both your users and your reputation.

Coping When a Service Fails

  • Retry a few times, waiting longer between each attempt.
  • Give up gracefully and queue the work for later.
  • Show the user a calm message rather than an error.
  • Stop hammering a service that is clearly down.

Avoiding Made-Worse Outages

Naive retries can make things worse by flooding a struggling service. We use spaced-out retries and a circuit breaker that backs off automatically, giving the other service room to recover.

FailureNaive responseResilient response
TimeoutFail instantlyRetry with backoff
Service downKeep hammering itPause, queue, alert
Slow responseHang the pageTime out and degrade gracefully

If you need a hand with any of this, your Progressive Robot delivery team is ready to help. Raise a ticket from the Support area of your client portal or speak to your account manager and we will guide you through the next steps.

Did you find this article useful?