GithubHelp home page GithubHelp logo

Comments (10)

ccaputo avatar ccaputo commented on June 26, 2024 2
  • implement a retry strategy with an incremental back-off time in response to 426;

429

from arouteserver.

grizz avatar grizz commented on June 26, 2024 1

I'd be happy to help with that one! It would also be a good excuse to make the client use a local cache.

from arouteserver.

pierky avatar pierky commented on June 26, 2024 1

v1.15.1 is out, with a way to set the API key. Using authenticated API queries should reduce the impact of rate limiting.

This issue will remain opened until I’ll check how to implement bulk queries, which should lower the number of interactions between ARouteServer and the PeeringDB API.

from arouteserver.

pierky avatar pierky commented on June 26, 2024 1

I pushed some commits here to implement the bulk queries (150 ASNs being queried at once to get IRR info and max-prefix limits) and also to add the user-agent header.

The CI/CD pipeline is running for 1.16.0-alpha1, which includes these changes: once it will be completed, it will be possible to install and test out the pre-release following these instructions.

from arouteserver.

pierky avatar pierky commented on June 26, 2024

The (optional) environment variable SECRET_PEERINGDB_API_KEY can now be used to set the API key to be used for PeeringDB API queries. This should mitigate the effects of the anonymous API throttling mechanism.

The CI/CD pipeline is running for 1.15.1-alpha1: once it will be completed, it will be possible to install and test out the pre-release following these instructions.

The new env var will be shipped as part of 1.15.1.

from arouteserver.

pierky avatar pierky commented on June 26, 2024

Other options:

  • implement a retry strategy with an incremental back-off time in response to 429; (done in 5461cdb)
  • add support for peeringdb-py
  • use bulk queries (asn__in=$list_of_ASN_separated_by_comma) (done in 3a2f827)

from arouteserver.

pierky avatar pierky commented on June 26, 2024

A retry-on-failure with back-off has been added, and also a way to pass the API key using a local file at a well-known path.

The CI/CD pipeline is running for 1.15.1-alpha2, which includes these changes: once it will be completed, it will be possible to install and test out the pre-release following these instructions.

from arouteserver.

ccaputo avatar ccaputo commented on June 26, 2024

If not using peeringdb-py, also needed:

  • Add a delay in between queries that is randomly between 2 and 2.5 seconds, to reduce thundering herd. This delay will mean arouteserver queries PeeringDB at most 30 hits per minute.

from arouteserver.

ccaputo avatar ccaputo commented on June 26, 2024

Another thing that would be great:

  • Set User-Agent to include "arouteserver" and the current version number. Right now it just shows up as, for example, python-requests/2.27.1. Would be better if it was arouteserver/x.y.z python-requests/a.b.c.

from arouteserver.

pierky avatar pierky commented on June 26, 2024

v1.16.0 is out with the improvements mentioned above.

I’ll file another ticket to analyze a potential integration with peeringdb-py, or to check whether it’s possible to add support for it.

from arouteserver.

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.