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.
| Failure | Naive response | Resilient response |
|---|---|---|
| Timeout | Fail instantly | Retry with backoff |
| Service down | Keep hammering it | Pause, queue, alert |
| Slow response | Hang the page | Time 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.