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回答
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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ