Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to improve slow uploading to Amazon S3

I am in the process of converting a website to upload user submitted photos and videos directly to Amazon S3 instead of to the local server.

When I worked with small image files, it seemed fine... but now that I try with larger images say over 1MB, the upload speed is too slow and unusable.

What are the common strategies to overcome this? Do websites like YouTube first upload to their local server and then move to Google Cloud or something? If I have thousands of users uploading at the same time, my local server won't be able to store so many files hence I was moving to S3 before realising how slow it was.

Any suggestions please?

like image 907
volume one Avatar asked Sep 17 '19 18:09

volume one


People also ask

How can I speed up my upload speed on my Galaxy S3?

Consider the following options for improving the performance of uploads and optimizing multipart uploads: If you're using the AWS CLI, customize the upload configurations. Enable Amazon S3 Transfer Acceleration.

How can I improve my S3 performance?

You can increase your read or write performance by using parallelization. For example, if you create 10 prefixes in an Amazon S3 bucket to parallelize reads, you could scale your read performance to 55,000 read requests per second. Similarly, you can scale write operations by writing to multiple prefixes.

How fast can you upload to S3?

Upload speed to AWS S3 tops out at 2.3 Mbps.

Why is S3 download so slow?

Large object size For very large Amazon S3 objects, you might notice slow download times as your web browser tries to download the entire object. Instead, try downloading large objects with a ranged GET request using the Amazon S3 API.


1 Answers

I would take the following steps:

  • Enable Transfer Acceleration on your S3 bucket.

  • Change your application to upload files in multiple parts, using S3 Multipart Upload, and use multi-threading to upload more than one part at a time.

like image 173
Mark B Avatar answered Oct 19 '22 06:10

Mark B