Improve Retry Logic for ErrCodeSerialization in AWS SDK #5336
jiaweian1001
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have encountered an issue with the default retry logic in the AWS SDK for Go, specifically related to the handling of ErrCodeSerialization errors. Here are our observations and suggestions for improvement:
Observations:
Retry Logic: The SDK primarily determines whether to retry based on business-level error codes (above HTTP), such as request timeouts and read timeouts. It also handles certain throttling error codes in detail.
Error Response Format: According to the AWS protocol, error responses should always be in a complete JSON format, including an error code and message. If not, the SDK returns an ErrCodeSerialization error, which is currently considered retryable by the SDK.
Questions:
In some cases, the server does not always return a response body that conforms to the standard, leading to unnecessary retries and time loss.
Proposed Solution:
We propose that the AWS SDK should enhance its retry logic by incorporating additional checks for the HTTP status code when handling ErrCodeSerialization errors. This would help prevent unnecessary retries and improve overall efficiency.
Beta Was this translation helpful? Give feedback.
All reactions