-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
We maintain what might be considered a degenerate (but hopefully not unreasonable) setup with ~50 Jenkins masters deployed to a single AWS account, all of which use the ec2 plugin.
We've been contacted by AWS and our DescribeInstances requests are getting throttled, with a plurality of our quota being used by the ec2 plugin. The limit appears to be 3000 resources requested per second, which seems reasonable.
It looks like every minute, all masters make a DescribeInstances request to verify the ec2 connection is still valid. However, this request does not provide a filter, so returns all EC2 instances in the AWS account. Since this check appears to just be a keepalive poll, I don't think it's necessary to request all instances, and a filter returning zero instances would suffice, and protect our API quota, since the quota goes by resources requested, not raw request counts.
We've been running one master with a patched ec2 plugin with such a change, and haven't noticed any ill effects, but this is just the result of a days worth of hunch-following. I'll file a PR for it shortly for feedback.
Github PR: https://github.com/jenkinsci/ec2-plugin/pull/456