-
Notifications
You must be signed in to change notification settings - Fork 16
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
Better rate limiting support #595
Comments
Hi @massyn , as far as I understand it, AWS has rate limiting on a per account, per region connection, so I don't believe the number of AWS accounts would affect rate limiting. What would affect how often rate limits are hit would be how many queries are run against tables that use the same service for a particular account region, e.g., if multiple queries are made to As far as I know, AWS shares how some service rate limits work, e.g., https://docs.aws.amazon.com/AWSEC2/latest/APIReference/throttling.html, but these aren't available programmatically and other services aren't as transparent with their rate limits. If you've seen any way to get these limits programmatically though, please share any links you have as we'd be interested in exploring them. Implementing some extra controls around this information is possible, but labor intensive and because not all services support it, we instead chose to handle throttling with configurations available in the AWS SDK. For instance, in the plugin, we implement a retry backoff strategy with jitter when we encounter throttling or retryable errors in https://github.com/turbot/steampipe-plugin-aws/blob/2387b04c46101344617c0472b62d9012025e9bad/aws/service.go#L1772, like AWS recommends in https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ and https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/, though we can still hit the maximum number of retries. Can you please have a look at some follow-up questions I have below, which I think may help us better understand your use case:
|
Are you receiving any particular errors? Or do your queries just take a long time to complete?
Do any specific connections seem to hit throttling more frequently?
What queries, checks, and/or dashboards are you running?
Do any seem to cause you to hit rate limits in particular?
Are there certain tables or services you hit rate limits with more frequently?
Does increasing max_error_retry_attempts and/or min_error_retry_delay from https://hub.steampipe.io/plugins/turbot/aws#configuration help with hitting
|
@massyn If I understand correctly, the main effect of how Steampipe and the AWS plugin are hitting the AWS API is that Steampipe will eventually cause the server/instance to run out of memory? Also, can you please share some log messages, console outputs, and/or screenshots of the errors and crashes you're seeing? These can help us try and reproduce and diagnose from our end. Thanks! |
@kaidaguerre, I've transferred this issue to the SDK repo for better tracking, as this looks like an SDK issue you are already working on. Please let us know if anything is required from the plugin team. |
@massyn have you tried the new rate limiting in v21? https://steampipe.io/blog/memory-management-rate-limiters-diagnostics |
Is your feature request related to a problem? Please describe.
On a large AWS account (100 accounts +) Steampipe would run into rate limiting issues on AWS.
Describe the solution you'd like
Steampipe should recognize the limits posed by each of the API endpoints, and should only queue the number of APIs based on the limit the service can entertain. At that point, Steampipe should wait (sleep) until the rate limit has lapsed.
Describe alternatives you've considered
Tweaking the MAX_PARRALLEL parameter, but this has no effect. There are no other options in the aws plugin where throttling of API calls, or any setting to manage rate limits can be tweaked.
Additional context
The text was updated successfully, but these errors were encountered: