3 ms·
> I generally hate this type of thing: retry mechanisms are a lazy band-aid that can mask real problems. I disagree. Retry mechanisms is mandatory for any netw
by runeks 5y ago
> I generally hate this type of thing: retry mechanisms are a lazy band-aid that can mask real problems.
I disagree. Retry mechanisms is mandatory for any network request. You cannot expect a message to travel across the globe on a wire without ever failing.
I would say the opposite: you must have a retry mechanism for all requests performed by your application; unless it’s acceptable to pass on this failure to the client (who will retry the request).
- gregmac 5y ago> I disagree. Retry mechanisms is mandatory for any network request. You cannot expect a message to travel across the globe on a wire without ever failing. Actually good point, and I agree. I didn't state that well. What I was thinking of was some other things in builds I've seen retries be the band-aid for: flaky, timing-based unit tests; locked files/directories; or applying database migrations. My usual reaction to adding a retry to a build step is "no, let's fix the actual problem". Network requests to external services are a special case though, and absolutely should always have retries.