Skip to content

Add S3 custom 503 throttling detection#6845

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

Add S3 custom 503 throttling detection#6845
RanVaknin wants to merge 5 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
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

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