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?

demandé il y a 2 ans445 vues
1 réponse
0
Réponse acceptée

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
EXPERT
répondu il y a 2 ans
  • 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.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions