Git Product home page Git Product logo

Comments (10)

dsnet avatar dsnet commented on May 7, 2024

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?

from safebrowsing.

rajnmithun avatar rajnmithun commented on May 7, 2024

I am talking about the network traffic in making the API call.
The scenario I am talking about is, if there are more than 10k unique partial hash hit and these are not in the local cache then we would make API call. At this point if the API key has a rate limit of 10K. It would exceed and get blocked.

from safebrowsing.

dsnet avatar dsnet commented on May 7, 2024

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.

from safebrowsing.

rajnmithun avatar rajnmithun commented on May 7, 2024

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.

from safebrowsing.

rajnmithun avatar rajnmithun commented on May 7, 2024

Batching of the URLs is going to be done any time soon or should I submit a PR?

from safebrowsing.

dsnet avatar dsnet commented on May 7, 2024

You're welcome to submit a PR (assuming you sign the CLA) and I can review it.

from safebrowsing.

rajnmithun avatar rajnmithun commented on May 7, 2024

I have a PR ready for the batching of the partial hashes. Can you please take a look at it @dsnet .

from safebrowsing.

rajnmithun avatar rajnmithun commented on May 7, 2024

@dsnet can you please let me know how to get this reviewed and merged in to master branch.

from safebrowsing.

alexwoz avatar alexwoz commented on May 7, 2024

Hi @rajnmithun, I apologize for the delay. I will try to take a look at this as soon as possible!

from safebrowsing.

rajnmithun avatar rajnmithun commented on May 7, 2024

@alexwoz thank you.

from safebrowsing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.