sonatype / ossindex-public

Sonatype OSS Index - Public
Apache License 2.0
6 stars 9 forks source link

API call : rate limit #49

Closed rmjstn closed 1 year ago

rmjstn commented 1 year ago

Hello,

I want to use the Sonatype OSS Index API. In the documentation it says that there is a limit to the number of requests allowed. This limit is higher in the case of creating an account. How high is this limit (I did not find the information)?

Extract from the documentation :

Rate and request metric limits apply to requests. If limits are exceeded then responses will indicate 429 Too many requests status. There are a number of request metrics that may trigger the 429 status.
Authenticated requests have a higher limit. Register for an account and authenticate requests to get a higher limit.

Thanks,

Rémy

anastasia-vanriet commented 1 year ago

Hi Rémy,

Thank you for your interest in OSS Index! Anonymous (without an account) users have a limit of 16 requests, and authenticated (with an account) users have a limit of 64 requests. Once the limit has been reached, every 1 minute the capacity increases by 1 until it reaches the full value. There is a limit of 128 components per HTTP request.

Please let us know if you have any further questions!

Anastasia

p3pijn commented 1 year ago

Hi @anastasia-vanriet , I was wondering if maybe anything changed recently in the rate limits of the OSSIndex API? We see in the logs of our pipelines that we start hitting rate limits (status code 429) already somewhere between 5 and 7 requests per minute, and this is in authenticated mode. Are the below numbers still accurate?

anastasia-vanriet commented 1 year ago

Hi @p3pijn,

I can confirm that you numbers you listed are still accurate.

To enable us to better assist you, we will require some information for troubleshooting purposes. Could you send us the email address(es) and/or IP address(es) with which you are seeing this behavior, as well as the exact message that accompanies the 429 status codes? You can email the information to ossindex@sonatype.org and reference this thread.

Anastasia

p3pijn commented 1 year ago

Hi @anastasia-vanriet, many thanks for your response, I have sent an e-mail last week with the requested info.

anastasia-vanriet commented 1 year ago

Hi @p3pijn,

Thank you for sending us the data! We'll investigate the issue and get back to you as soon as we can.

p3pijn commented 1 year ago

@ken-duck I have forwarded the e-mail to you 🙂

ken-duck commented 1 year ago

Got it. Thanks!