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

Reduce parallelism when polling from AWS APIs #40775

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Apr 22, 2024

Reduce parallelism when polling AWS APIs and add a retry definition

Changelog: Reduce parallelism when polling AWS resources to prevent API throttling when exporting them to Teleport Access Graph

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@tigrato tigrato added backport/branch/v14 no-changelog Indicates that a PR does not require a changelog entry backport/branch/v15 labels Apr 22, 2024
@tigrato tigrato marked this pull request as ready for review April 22, 2024 20:27
@github-actions github-actions bot requested review from avatus and tcsc April 22, 2024 20:27
// This is a temporary solution until we have a better way to limit the
// number of concurrent requests.
eG.SetLimit(10)
eG.SetLimit(5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Should we make this configurable?
  2. Does AWS has different rate limits for different accounts? If yes, this change will help some and make stuff slower for other.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. No
  2. Yes and it depends if you requested an API quota increase. Once we move to SDK V2, I can implement a proper retry and rate limiter but until then we are kind of limited on what we can do.

@jakule
Copy link
Contributor

jakule commented Apr 22, 2024

@tigrato IMO this should be include in the release notes. Something like "reduce the number of concurrent requests to AWS API to reduce the rate limiting errors".
If you're getting rate limiting errors this information may convince you to update.

@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from tcsc April 23, 2024 02:54
@tigrato tigrato enabled auto-merge April 23, 2024 08:15
@tigrato tigrato removed the no-changelog Indicates that a PR does not require a changelog entry label Apr 23, 2024
@tigrato tigrato added this pull request to the merge queue Apr 23, 2024
Merged via the queue into master with commit 4f7c085 Apr 23, 2024
40 checks passed
@tigrato tigrato deleted the tigrato/fix-aws-poll branch April 23, 2024 09:05
@public-teleport-github-review-bot

@tigrato See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Create PR

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

Successfully merging this pull request may close these issues.

None yet

3 participants