Skip to content

Retry idempotent requests on ECONNRESET#226

Merged
rianmcguirefly merged 2 commits intomainfrom
rm/retry-conn-reset
Apr 28, 2026
Merged

Retry idempotent requests on ECONNRESET#226
rianmcguirefly merged 2 commits intomainfrom
rm/retry-conn-reset

Conversation

@rianmcguirefly
Copy link
Copy Markdown
Member

@rianmcguirefly rianmcguirefly commented Apr 27, 2026

Make the API clients more robust to transient network issues.

  • fly.Client and fly.tracingGenqlientClient (GraphQL clients): retry GraphQL queries only.
  • flaps.Client: retry GET requests. We can expand this on an endpoint-by-endpoint basis later.

There's an existing rehttp transport in NewHTTPClient that applies automatic retry, but it doesn't catch ECONNRESET. It also operates at the transport layer and can't reliably distinguish idempotent requests that are safe to retry after a connection reset.

Retry policy: Exponential backoff - 100ms initial, 500ms cap, 50% jitter, max 2 retries

@rianmcguirefly rianmcguirefly changed the title Retry requests on ECONNRESET Retry idempotent requests on ECONNRESET Apr 28, 2026
@rianmcguirefly rianmcguirefly marked this pull request as ready for review April 28, 2026 01:35
@rianmcguirefly rianmcguirefly merged commit 88c9ea5 into main Apr 28, 2026
5 checks passed
@rianmcguirefly rianmcguirefly deleted the rm/retry-conn-reset branch April 28, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant