Developers want automatic retries on all HTTP calls in the shared client library.
IntermediateScenarioReleases & Reliability Patterns
Answer
Situation read → Blanket retries risk duplicate writes and retry storms.
What I'd do →
- Retry only idempotent methods (GET, PUT, DELETE) or requests with idempotency keys.
- Retry only transient failures (connection errors, 503, timeouts).
- Exponential backoff with jitter, max 2 to 3 attempts.
- Global retry budget per client.
- Make retries configurable per call and expose metrics on retry count.
Why → Safe defaults in shared libraries prevent organization-wide incidents.
Interview tip → Mention idempotency and retry budgets.
More on Releases & Reliability Patterns
A canary at 10% shows a 0.3% higher error rate than stable. Promote or roll back?IntermediateA downstream service is slow, and your service's retries are making it worse.IntermediateYou need to roll out a risky database schema change with zero downtime.AdvancedA feature flag was turned on for 100% of users and caused errors. How do you handle it and prevent recurrence?BeginnerYour service calls five dependencies sequentially, and total latency is too high.IntermediateA third-party API you depend on has rate limits, and you're hitting them during peaks.Beginner