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?

gefragt vor 2 Jahren445 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
EXPERTE
beantwortet vor 2 Jahren
  • 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.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen