Skip to content

[v2] Update standard retry mode via opt-in env var#10342

Open
aemous wants to merge 2 commits into
v2from
v2-update-retries-2-1
Open

[v2] Update standard retry mode via opt-in env var#10342
aemous wants to merge 2 commits into
v2from
v2-update-retries-2-1

Conversation

@aemous
Copy link
Copy Markdown
Contributor

@aemous aemous commented May 22, 2026

Notes:

Description of changes:

  • Introduced new AWS_NEW_RETRIES_2026 environment variable. When set to true, standard retry mode behavior is changed.
  • The standard retry mode behavior changes (gated behind the new env var) is described below:
    • Service-specific max attempts — Service-defined (e.g., DynamoDB with 4 attempts) max attempt values instead of the universal default of 3, but only if the user hasn't explicitly configured max attempts.
    • Throttling-aware backoff — The ExponentialBackoff is initialized with a throttling_detector and service_name, enabling it to use different backoff scales depending on whether the error is a throttling error and which service is being called (e.g., 25ms base for DynamoDB non-throttling errors vs. 50ms for other services vs. 1s for throttling errors).
    • Throttling-aware retry quota — The RetryQuotaChecker receives a throttling_detector, allowing it to deduct a smaller quota cost (5) for throttling errors vs. the standard cost (14) for other retryable errors.
    • Service name passed to RetryHandler — For known long-polling operations (e.g., SQS ReceiveMessage, SFN GetActivityTask), when retry quota is exhausted the handler sleeps the backoff delay before returning without retrying.
  • Added new test cases for the new standard retry mode behavior updates.

Description of tests:

  • Successfully ran pre-production build workflow (see Build Internal GitHub Action).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aemous aemous added the v2 label May 22, 2026
@aemous aemous marked this pull request as ready for review May 22, 2026 18:38
@aemous aemous changed the title [v2] Update standard retry mode via opt-in env var [NOT READY] [v2] Update standard retry mode via opt-in env var May 22, 2026
@aemous aemous requested a review from a team May 22, 2026 20:37
@aemous aemous changed the title [NOT READY] [v2] Update standard retry mode via opt-in env var [v2] Update standard retry mode via opt-in env var May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant