github API 速率限制是每个用户还是每个 domain/ip 地址?
Is the github API rate limit per user or per domain/ip address?
Github 文档说:
For requests using Basic Authentication or OAuth, you can make up to 5,000 requests per hour
这个限制是针对每个用户,即每个访问令牌,还是每个 IP 地址?
例如,如果我有 10 个 OAuth 授权用户使用我的服务器应用程序从 github api 访问数据,我的服务器 ip 的限制是每小时 5k 还是 5k x 10?
紧跟你问题中引用的句子之后的两句话contain the answer:
For requests using Basic Authentication or OAuth, you can make up to
5,000 requests per hour. For unauthenticated requests, the rate limit
allows you to make up to 60 requests per hour. Unauthenticated
requests are associated with your IP address, and not the user making
requests.
因此,经过身份验证的请求的速率限制适用于用户帐户而不是 IP 地址。
如果您仍然有疑问,可以通过查看 GitHub API or through the special Rate Limit API.
的回复中包含的 X-RateLimit-*
headers 来检查您的速率限制状态
Github 文档说:
For requests using Basic Authentication or OAuth, you can make up to 5,000 requests per hour
这个限制是针对每个用户,即每个访问令牌,还是每个 IP 地址?
例如,如果我有 10 个 OAuth 授权用户使用我的服务器应用程序从 github api 访问数据,我的服务器 ip 的限制是每小时 5k 还是 5k x 10?
紧跟你问题中引用的句子之后的两句话contain the answer:
For requests using Basic Authentication or OAuth, you can make up to 5,000 requests per hour. For unauthenticated requests, the rate limit allows you to make up to 60 requests per hour. Unauthenticated requests are associated with your IP address, and not the user making requests.
因此,经过身份验证的请求的速率限制适用于用户帐户而不是 IP 地址。
如果您仍然有疑问,可以通过查看 GitHub API or through the special Rate Limit API.
的回复中包含的X-RateLimit-*
headers 来检查您的速率限制状态