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?

질문됨 2년 전444회 조회
1개 답변
0
수락된 답변

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
전문가
답변함 2년 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠