Giter Club home page Giter Club logo

Comments (3)

debora-ito avatar debora-ito commented on August 18, 2024 2

@mubasherhussain9d

Tuning the timeout values is the proper solution in this case.

The SDK uses default timeout values that will work on most of the use cases. At the same time, we expose client configurations that you can customize to fit your specific use case, like running in an environment with high latency connectivity.

We suggest you generate the SDK client-side metrics to have an insight of the client performance in its own application environment. The metrics can be used to define what's the best timeout value to set in the client. For instructions on how to generate the metrics, check the Developer Guide and the blog post.

from aws-sdk-java-v2.

mubasherhussain9d avatar mubasherhussain9d commented on August 18, 2024

The timeout tuning mechanism is the viable solution for now but not the reliable solution, let me explain why;

there could be files of different sizes to be uploaded, so setting a fixed timeout is not a reliable solution. We have checked the different timeout values on files with different sizes, let's say, timeout = 1 min is fine for file sizes up-to 20MB or 25MB, but the very same timeout value is not fine for a file having size more then 25MB as the error occurs stating that Write timeout as mentioned above. So, how can we define a timeout value that works for all file sizes ? or, is there any other way around to manipulate the write timeout value at runtime while file is uploading, according the the internet speed and file size ?

from aws-sdk-java-v2.

debora-ito avatar debora-ito commented on August 18, 2024

A timeout that will work for all file sizes is a higher timeout. You can use AwsRequestOverrideConfiguration to set some timeouts at the request level, but not all timeout settings are available. If you don't want a timeout that is too high for the smaller files, you can create different clients with different settings: one s3 client with lower timeouts for the small files, and another s3 client with higher timeouts for the bigger files.

I still highly recommend to generate the SDK client-side metrics. You can then interpret the SDK metrics of your client to help define better custom settings.

We do have two blog posts that show how to interpret the client-side metrics to improve resiliency of your application (note that the blog posts show Java SDK v1 code, but the theory behind is the same, and most of the v1 metrics have v2 equivalents):

  • Tuning AWS Java SDK HTTP request settings for latency-aware Amazon DynamoDB applications - link
  • Tuning the AWS SDK for Java to Improve Resiliency - link

Out of curiosity, have you tried using the S3CrtAsyncClient in the S3TransferManager, instead of NettyNio? It would be interesting to see how the S3 CRT client performs in comparison to Netty in this case.

from aws-sdk-java-v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.