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

질문됨 일 년 전1693회 조회
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
전문가
답변함 일 년 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠