How to speedup listObjectsV2

0

Hello! I'm using s3 storage with javaScript SDK. I have a bucket with folders. Inside folder I have files(around 5). If I make request with:

s3.listObjectsV2({
      Bucket: bucketName,
      Prefix: fileName,
    }

I receive answer in 1100 - 1200 ms. it's a lot as I think. And as I tested it - it doesnt depend on bucket size. I had the same result for almost empty bucket.

So my question is: how I can speedup this request?

preguntada hace 2 años445 visualizaciones
1 Respuesta
0
Respuesta aceptada

Hi - Not able to replicate 1100 - 1200 ms but here are the observations. For testing, created two empty buckets, one in in US East (N. Virginia) us-east-1 and another in US West (Oregon) us-west-2. The sample code is in us-east-1

  1. When running s3.listObjectsV2 JS code against US West (Oregon) us-west-2 bucket , upto 800ms or sometimes 600 ms is observed.
  2. When running s3.listObjectsV2 JS code against US East (N. Virginia) us-east-1 bucket , less than 100ms is observed.

So in this case the Round-trip Time is playing into effect perhaps.

Thanks

profile pictureAWS
EXPERTO
respondido hace 2 años
  • Thank you for your answer. It really depends on distance to server. I dont't really understand why it depends so much, because I have a ping to european server about 300 ms, but full answer from S3 I receive in 1000ms. My colleague from Europe receives it in 150-200 ms.

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