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?

asked 3 months ago34 views
1 Answer
0
Accepted Answer

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 picture
EXPERT
answered 3 months ago
  • 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.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions