Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the newer recommended S3 ListObjectsV2 API #2

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

giuli007
Copy link

@giuli007 giuli007 commented Mar 22, 2022

This is a copy of giuli007#1 (based off a recent master and not including the changes in aptly-dev#1002 so they can be merged separately) to be merged into the Yelp fork of aptly along with other changes so we can streamline changes to aptly from different contributors and build them internally.

Copied the relevant description for visibility

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.

@giuli007 giuli007 merged commit 59a0c01 into master Mar 23, 2022
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.

3 participants