Speed up downloading multiple files from same S3 bucket

0

Hi all,

I have a web app that needs multiple assets from one S3 bucket. The assets get updated periodically but maintain their names.

I am hoping to use the html resource hint "preconnect", hoping that the client's browser can maintain an open connection to "https://[BUCKET].s3.amazonaws.com", so I can load my Javascript and CSS files first before downloading those assets, but I do not see DNS lookup and handshake early; instead, I see one DNS lookup and one handshake per asset request. I am using multiple Javascript fetch calls to request the S3 assets.

I do not want to use the html resource hint "preload" as I don't want the S3 bucket assets to fight over bandwidth with the critical Javascript and CSS files, but I do not want to wait for the browser to make multiple DNS lookups and handshakes at asset download time either.

Any thought on how to optimize this? Thanks in advance.

Chulinguy

已提問 1 年前檢視次數 1691 次
1 個回答
0

Hi, did you think about the parallel download provided by the various SDKs?

https://docs.aws.amazon.com/AmazonS3/latest/userguide/example_s3_Scenario_UsingLargeFiles_section.html

I personally did it with Java not Javascript like and obtained very good results via the provided parallelism.

profile pictureAWS
專家
已回答 1 年前
  • The SDK itself is a bigger download than the sum of the assets needed from S3, so most likely it would introduce a performance loss.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南