Skip to content

S3 multi-threaded read throttling #774

Answered by Velfi
oxlade39 asked this question in Q&A
Discussion options

You must be logged in to vote

We have a relevant example for sending concurrent PutObject requests. We also have an integration test that may be helpful.

My key tips for this:

  • Don't construct requests until you're ready to send them. This will reduce memory usage.
  • Use a tokio Semaphore to limit the number of concurrent requests. A good limit can only be found through testing, as it depends on the service, the size of requests, and the size of responses.
  • Be prepared for some requests to fail. Requests can fail for all sorts of reasons, and the smithy client's request retry mechanism isn't always enough. Therefore, track failed requests and come up with a strategy for retrying them at some later time.
  • Beware of unbound…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@oxlade39
Comment options

Answer selected by rcoh
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants