Skip to content

Add S3 custom 503 throttling detection#6845

Open
RanVaknin wants to merge 6 commits intomasterfrom
rvaknin/fix-s3-head-503-throttling-detection
Open

Add S3 custom 503 throttling detection#6845
RanVaknin wants to merge 6 commits intomasterfrom
rvaknin/fix-s3-head-503-throttling-detection

Conversation

@RanVaknin
Copy link
Copy Markdown
Contributor

Addresses #5414

S3's RestXML protocol sends the response's error information in the response body. Since S3 head* operations do not have a body, we need to infer what kind of exception it is from the error message. In case of throttling, S3 will send:

HTTP/1.1 503 Slow Down

We need to grab the status code (503) and status text ("Slow Down") and use those two to infer that the server throttled the request.

We already have an execution interceptor for S3 that extracts info from head operation responses. All this PR does is adds one more logic branch that handles extracting the error info from the slow down responses, and create the appropriate S3Exception that will get classified as ThrottlingException and will apply the appropriate retry mechanism

@RanVaknin RanVaknin requested a review from a team as a code owner April 7, 2026 22:56
@RanVaknin RanVaknin force-pushed the rvaknin/fix-s3-head-503-throttling-detection branch from d2fc35b to 4dfe282 Compare April 8, 2026 17:06
Copy link
Copy Markdown
Contributor

@joviegas joviegas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Release notes can we add a line to say that earlier 503 S3 StatusMessage was Slow Down and not its SlowDown that way we communicate we are updating the status message of the S3 503 response status at client side.

@RanVaknin RanVaknin force-pushed the rvaknin/fix-s3-head-503-throttling-detection branch from e27f330 to 570f973 Compare April 21, 2026 20:53
@RanVaknin
Copy link
Copy Markdown
Contributor Author

In the Release notes can we add a line to say that earlier 503 S3 StatusMessage was Slow Down and not its SlowDown that way we communicate we are updating the status message of the S3 503 response status at client side.

Status Message (returned in the response metadata) did not change, it's still Slow Down. The only thing that changed is the SDK's errorCode field (parsed from the response's xml body) went from null to SlowDown.

@sonarqubecloud
Copy link
Copy Markdown

@RanVaknin RanVaknin enabled auto-merge April 22, 2026 00:16
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.

2 participants