Comments (2)
@jasdel What retry strategy would you suggest for this type of operation? Are there any other services in the SDK that use similar approach to the one you suggested?
from aws-sdk-go-v2.
Thanks for asking @fifarafa. The idea behind this alternative approach is to allow the SDK to wrap the concept of retrying an S3 GetObject download attempt. The C++ SDK is the only SDK that uses a similar approach to this alternative approach. With a few exceptions (Glacier), S3 is the only API with operations to download byte streams.
The retry strategy for this approach would require the user to provide a io.Writer
that can be reset/reinitialized in the case the download failed, and the API does not support byte-range
requests. There are two strategies that could occur during a retry. If the API supports byte-range requests, the SDK could resume from the last byte it wrote to the user provided io.Writer
. Alternatively if the API does not support byte-range
requests the SDK would have to start downloading the content from the beginning, and requiring some means of being able to reinitialize the writer for a fresh write.
Both of these approaches seem fragile, and error prone. After reviewing this alternative approach, I'm not convinced it is a good idea for the SDK to invert the way it exposes downloading a byte stream from a API operation, e.g. S3 GetObject. For the S3 GetObject specific usecase the SDK's s3manager.Downloader
provides much more consistent behavior since it was tailor made for S3's GetObject. The Downloader
has full support for retrying failed GetObject requests.
from aws-sdk-go-v2.
Related Issues (20)
- EC2Query empty list serialization behavior is incorrect HOT 1
- S3: intermittent TLS 1.3 handshake failures HOT 2
- Support generic SigV4 and SigV4A signers HOT 1
- package docs for github.com/aws/aws-sdk-go-v2/aws/signer/v4 are malformed HOT 2
- Something changed from version v1.22.2 to v1.26.1 and I can't find what HOT 1
- Add public constant values for Redshift Cluster - ClusterStatus HOT 2
- feature/s3/manager needs an overhaul
- Add cloudwatch.PutMetricAlarmInput possibility to choose region HOT 2
- Customize S3's "Expires" field to handle invalid timestamps HOT 1
- S3 client falling over after 4-5 hours of processing 200 files per minute HOT 5
- Add support for Prometheus compatible APIs in amp service HOT 4
- Control Tower Landing Zone manifest retentionDays unmarshalled into string instead of number HOT 4
- Support for paginators in the apigatewayv2 service HOT 2
- Unexpected error type returned for DescribeDBClusterParameterGroups HOT 4
- Incorrect S3 object key(Path) Handling for domainStyle HOT 4
- InferenceConfiguration godoc has random data pasted in HOT 2
- Add support to create git tags HOT 2
- Support KRaft mode for MSK HOT 3
- Duplicate Go Pkg Docs HOT 2
- sts PresignGetCallerIdentity - make it simpler to add custom HTTP headers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-go-v2.