-
Notifications
You must be signed in to change notification settings - Fork 128
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
rate limit the API call #29
Comments
Hi, can you elaborate? Currently, the logic avoids any API calls over the network if the result is in the local cache. Are you talking about a general rate-limiter for network traffic? |
I am talking about the network traffic in making the API call. |
I see. In your usage of LookupURLs, are you passing in a batch of URLs every time you call it? Before implementing any rate limiting logic, I would much rather see the TODO in that function be addressed. As it currently is, we make a network call for each URL, rather than batching them together. On the other hand, if you have many goroutines calling LookupURLs independently with only a small handful of URLs, then some rate limiting mechanism may be needed. |
I am currently not batching the URLs to LookupURLs(which is on my TODO). Also I have a scenario where I have multiple goroutines/instance of the client running which would still need a mechanism for rate limiting across them. |
Batching of the URLs is going to be done any time soon or should I submit a PR? |
You're welcome to submit a PR (assuming you sign the CLA) and I can review it. |
@dsnet can you please let me know how to get this reviewed and merged in to master branch. |
Hi @rajnmithun, I apologize for the delay. I will try to take a look at this as soon as possible! |
@alexwoz thank you. |
It would be nice to have rate limiter before making a call to API if it is in the local cache.
The text was updated successfully, but these errors were encountered: