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

Proposal: Track rate limiting from GitHub API #19

Open
alexellis opened this issue Nov 9, 2017 · 7 comments
Open

Proposal: Track rate limiting from GitHub API #19

alexellis opened this issue Nov 9, 2017 · 7 comments

Comments

@alexellis
Copy link
Owner

Context

When authenticated we have 50 requests to the API / hour. When we are authenticated we have 5k per hour +/-.

Idea: track rate-limiting

It's unlikely that we will burn up 5k in an hour on the OpenFaaS org, but larger projects may hit this and this should be observable.

What do we do?
How do we track this?

@rgee0
Copy link
Contributor

rgee0 commented Nov 9, 2017

A couple of initial notes while thinking.

GET /rate_limit exposes the values.

The limit appears to be distinct time-slices rather than a sliding window.

@alexellis
Copy link
Owner Author

Hmm is that a proposed API or a GH thing?

@alexellis
Copy link
Owner Author

@alexellis
Copy link
Owner Author

We could definitely track it in alertmanager and send through to a webhook.

@alexellis
Copy link
Owner Author

Derek add label: priority/high

@derek derek bot added the priority/high label Feb 7, 2018
@alexellis
Copy link
Owner Author

I wonder if we should write a small function as a prometheus exporter which can produce this information for all the installations we have registered. It may involve us collecting the installation messages when the GitHub app is registered.

@Waterdrips
Copy link
Contributor

Waterdrips commented Jan 16, 2020

https://developer.github.com/v3/#rate-limiting
The returned HTTP headers of any API request show your current rate limit status:

The remaining limit is in the X-RateLimit-Remaining header.

We could fire off some event when this gets low

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

No branches or pull requests

3 participants