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

Client HTTP requests to OSS Index API should be done in parallel where possible #24

Open
allisterb opened this issue Feb 26, 2019 · 1 comment

Comments

@allisterb
Copy link
Contributor

Right now client requests are serialized which leads to long wait time for getting results for projects with many dependencies. A parallel implementation of querying the API can make things significantly faster and perhaps remove the need for a cache.

@ken-duck
Copy link
Contributor

Actually, the cache is required due to there being rate limiting on the new API. By caching we ensure that each package is only queried once per day, which means any particular user is less likely to hit the cache.

The rate limiting uses a "leaky bucket" algorithm. Depending on whether you are a registered user or not, the rate limit has a different starting number of requests (16 for non-registered, 64 for registered). Each request can be for 128 total packages. Requests replenish at a rate of one per minute.

So regardless of whether we add parallelization, we definitely don't want to get rid of the caching.

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

No branches or pull requests

2 participants