Skip to content

Add S3 custom 503 throttling detection - #6845

Merged
RanVaknin merged 6 commits into
masterfrom
rvaknin/fix-s3-head-503-throttling-detection
Apr 28, 2026
Merged

Add S3 custom 503 throttling detection#6845
RanVaknin merged 6 commits into
masterfrom
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

@joviegas joviegas left a comment

Copy link
Copy Markdown
Contributor

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.

@RanVaknin
RanVaknin enabled auto-merge April 22, 2026 00:16
@RanVaknin
RanVaknin added this pull request to the merge queue Apr 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
34 Security Hotspots
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 24, 2026
@RanVaknin
RanVaknin added this pull request to the merge queue Apr 28, 2026
Merged via the queue into master with commit f3749a1 Apr 28, 2026
52 of 55 checks passed
@github-actions

Copy link
Copy Markdown

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 28, 2026
@RanVaknin
RanVaknin deleted the rvaknin/fix-s3-head-503-throttling-detection branch July 20, 2026 20:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants