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 Risposta
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
ESPERTO
con risposta un anno fa
  • 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.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande