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

preguntada hace un año1689 visualizaciones
1 Respuesta
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
EXPERTO
respondido hace un año
  • 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.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas