Skip to content
Wade Womersley

wade.one

wade womersley – york based software engineer

  • Home
  • 2026
  • November
  • 17
  • Retries Need a Budget Before They Need Another Attempt

Retries Need a Budget Before They Need Another Attempt

Posted on November 17, 2026November 12, 2026 By
Programming

A retry is another request to a service that may already be struggling. That sounds obvious until the browser, API and SDK all helpfully decide to try again. If each layer makes three attempts in total, one original request can produce as many as 27 attempts at the bottom of the stack. The individual settings look modest. Their combined behaviour is rather less modest.

The AWS article on timeouts, retries and backoff with jitter explains how retries can amplify load and why spreading them out matters. I would start by finding which layers already retry, including the client library. Adding an application retry loop without checking the SDK can change the amount of work much more than the code suggests.

Then give the operation an overall time budget. A five-second deadline is not useful if every new attempt gets a fresh five seconds and there are several pauses in between. Count the initial attempt, cap subsequent attempts and account for the time already spent. Backoff and jitter help spread the load, but neither makes an unlimited retry loop sensible. The caller still needs a clear outcome when the budget is exhausted.

Decide which failures are worth another attempt and whether repeating the operation is safe. Invalid input is unlikely to improve after a short sleep. A temporary connection failure may be different, but writes still need to account for work that could already have completed. I would test a persistently failing dependency and count actual outbound calls, rather than only checking that the final error looks right. A retry policy should make a temporary problem easier to survive without turning a longer outage into a traffic generator.

Share:

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Reddit (Opens in new window) Reddit

Related

Comments

comments

Tags: distributed-systems resilience retries

Post navigation

❮ Previous Post: Missing and Null Need Different Rules in a PATCH API

You may also like

Programming
Why Logging Is Still a Product Feature
April 18, 2026
Programming
Why I Prefer Explicit Over Magical Defaults
April 20, 2026
Programming
Ask for Android Permissions When the Feature Actually Needs Them
November 7, 2026
PHP
PHP 8.5 array_first and array_last Remove Tiny Annoying Helpers
May 31, 2026
  • AI
  • artificial intelligence
  • Ego-centric
  • Events
  • Films
  • Food
  • Gaming
  • Gym
  • Hardware
  • Holidays
  • News
  • PHP
  • Programming
  • Random Stuff
  • Reviews
  • Science
  • SEO
  • Software
  • Software Engineer
  • Support
  • Uncategorized
  • Work

Copyright © 2026 wade.one.

Theme: Oceanly News Dark by ScriptsTown