Announcement: Updated default retry behavior (2026) #1885
Pinned
luigi617
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We're updating the standard retry strategy in the AWS SDK for Kotlin and the underlying smithy-kotlin runtime. This change brings the Kotlin SDK in line with other AWS SDKs, ensuring a more consistent retry experience across languages. The new values are specifically chosen to decrease failure rates and reduce unnecessary CPU usage and cost during partial or full outages. The update refines backoff timing, adds service-specific tuning for DynamoDB, introduces retry header support, and improves handling of long-polling operations.
Nothing is changing with the default standard retry behavior today. The new standard retry will be available to opt in for early testing in release 1.6.73, released on 05/13/2026, and will become the default in release 1.8.0, tentatively scheduled for Q1 2027.
Status
aws-sdk-kotlinversion1.6.73and laterAWS_NEW_RETRIES_2026=true1.8.0, tentatively Q1 2027What changed
When you set
AWS_NEW_RETRIES_2026=true, the retry defaults withinstandardmode update. The retry mode itself does not change.If you have explicitly configured max attempts or backoff, your value takes precedence for that setting.
Backoff timing
The retry delay for a given attempt is calculated as:
Where
attemptNumberis 0-indexed (the first retry usesattemptNumber = 0) andmaxBackoffis 20 seconds (unchanged).Transient errors (such as 500s and connection resets) now use a much shorter backoff than throttling errors (where the service asks you to slow down). For details on backoff timing, error classification, and the retry quota, see Retry behavior in the AWS SDKs. For retry mode selection and configuration options, see Retry behavior in the AWS SDKs.
Retry header:
x-amz-retry-afterThe SDK now honors the
x-amz-retry-afterresponse header, which allows services to recommend a specific backoff duration in milliseconds. The SDK will never wait less than its own calculated backoff, and never more than 5 seconds beyond it.How to opt in
Update to
aws-sdk-kotlinversion1.6.73or later, then set the environment variable:export AWS_NEW_RETRIES_2026=trueYou can also set it as a JVM system property:
smithy-kotlin
For smithy-kotlin users not using the AWS SDK, the equivalent flag is:
export SMITHY_NEW_RETRIES_2026=trueOr as a JVM system property:
AWS_NEW_RETRIES_2026takes precedence. When it is set (totrueorfalse), that value is used andSMITHY_NEW_RETRIES_2026is ignored. Only whenAWS_NEW_RETRIES_2026is unset does the SDK checkSMITHY_NEW_RETRIES_2026.AWS_NEW_RETRIES_2026SMITHY_NEW_RETRIES_2026truefalsetruefalseor unsetHow to revert
During the opt-in period, remove the environment variable:
unset AWS_NEW_RETRIES_2026After the default rollout (version
1.8.0, tentatively Q1 2027), theAWS_NEW_RETRIES_2026flag will be removed. The updated behavior cannot be reverted because this SDK does not supportlegacyretry mode. You can override individual settings:AWS_MAX_ATTEMPTSor configure in code.If this is a concern for your use case, please let us know in this issue.
Where you might notice a difference
For most workloads, the change is invisible or strictly better. Transient errors recover faster because the base delay is significantly shorter.
SQS.ReceiveMessageapply a backoff delay before returning an error, even when retries are blocked. Without this, polling loops tighten during outages, spiking client CPU usage and generating additional load that can delay recovery. For details, see long-polling operations.Overriding specific settings
You do not have to accept all changes as a bundle. If you opt in but want to keep a specific previous value, set it explicitly. Precedence applies per setting.
For example, to use the new backoff timing but keep a higher DynamoDB max attempts:
For the full list of configurable settings and their precedence, see Retry behavior in the AWS SDKs.
Feedback
If you run into any issues or have questions, please open an issue in aws-sdk-kotlin or comment on this discussion. Your feedback during the opt-in period directly shapes when and how we make this the default.
Beta Was this translation helpful? Give feedback.
All reactions