Skip to content

Comments

Use the newer recommended S3 ListObjectsV2 API#1

Open
giuli007 wants to merge 1 commit intoissue/989-add-zstandard-supportfrom
s3_listbojectsv2
Open

Use the newer recommended S3 ListObjectsV2 API#1
giuli007 wants to merge 1 commit intoissue/989-add-zstandard-supportfrom
s3_listbojectsv2

Conversation

@giuli007
Copy link
Owner

@giuli007 giuli007 commented Mar 18, 2022

Fixes

This change is to addresses a situation we have encountered running in AWS EKS where each single (1000-paginated) request using the older ListObjects API via s3.ListObjectsPages takes seconds to receive a response, resulting in tens of minutes long publishing times when the bucket contains >100k packages (which is the cases for repos mirrored from ubuntu repos and republished in-house).
This doesn't look like normal throttling as no explicit throttled responses are seen when enabling debug in the https://www.aptly.info/doc/configuration/. The reasons why the old API is so slow only when running in EKS are still unknown.

Description of the Change

Uses the more modern recommended ListObjectsV2 to list objects on the S3 bucket when publishing to it.
https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html

This is faster, especially when running in EKS.

These changes are based off the issue/989-add-zstandard-support branch (same as aptly-dev#1002) which includes changes made by ahaswell that we are already using internally.

These changes live on my personal repo temporarily. I plan on including them (as well as those on issue/989-add-zstandard-support) into a repo owned by the Yelp org and to eventually build it from there (and potentially also make a PR upstream from there).

Checklist

  • unit-test added (if change is algorithm)
  • functional test added/updated (if change is functional)
  • man page updated (if applicable)
  • bash completion updated (if applicable)
  • documentation updated
  • author name in AUTHORS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant