-
Notifications
You must be signed in to change notification settings - Fork 179
Add option to use S3 accelerated endpoint for faster transfers #3675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add option to use S3 accelerated endpoint for faster transfers #3675
Conversation
3164587
to
8e3966b
Compare
In a quick read about the use_accelerate_endpoint, it sounds like it only has benefit when the client is in a different region from the bucket and the files are largish. Should there be any sort of check for either of these conditions, since using use_accelerate_endpoint incurs higher transfer costs? |
That sounds good, but I'm not sure how to implement this. |
@pchoisel it might help to explain the problem you're trying to solve, then we may be able to provide better input on design. |
@zachmullen Thanks. To make this more optimized, I could perhaps use this accelerated endpoint only when Girder sends a transfer link to a user so their client can transfer data to S3, and not when Girder directly transfers data to S3 ? |
I do think this is the right place to make the choice -- at the point of building the presigned URLs rather than bound to the lifetime of the assetstore. I see two possibilities:
I think option 2 is a much better idea, but am open to discussion. |
I agree that option 2 is the best. However, there are some clients that I cannot change easily #girderwebcomponents Do you think I should still add an assetstore option to enable accelerated transfer ? That would make the endpoints return an error if it's disabled but the client requested a accelerated transfer. |
Yes, we should probably only allow accelerated transfer if the assetstore explicitly allows it. |
e42bb5c
to
04d9618
Compare
Here it is. I originally wanted to store the fact that an upload should be made with acceleration in the upload document, but I was worried about S3 usage being restricted in between the upload init and the chunk upload. Also, using acceleration just for uploading chunks and using the regular URL for the rest of the requests (completion for example) works fine. I changed the extraParameters arg of the download API from a param to a jsonParam. I couldn't find anything using it and I think it made more sense. Let me know if I should revert that back. |
S3 buckets transfer acceleration is an AWS feature that speeds up data transfer from a client to an S3 bucket using CloudFront.
04d9618
to
a902a13
Compare
@manthey If you have some time, could you have a look ? |
@@ -254,8 +262,8 @@ def readChunk(self, upload, offset, params): | |||
.param('contentDisposition', 'Specify the Content-Disposition response ' | |||
'header disposition-type value.', required=False, | |||
enum=['inline', 'attachment'], default='attachment') | |||
.param('extraParameters', 'Arbitrary data to send along with the download request.', | |||
required=False) | |||
.jsonParam('extraParameters', 'Arbitrary data to send along with the download request.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the ramifications are of changing from param
to jsonParam
will be. This switching the extra parameters from a string to a parsed json object. The only place I see it used before this is in downloads.
No description provided.