tweaselORG / platform

Server for the tweasel.org platform, allowing users to analyse Android and iOS apps for data protection violations and send complaints about them to the data protection authorities.
MIT License
1 stars 0 forks source link

External API throttling and ratelimiting #8

Closed baltpeter closed 3 months ago

baltpeter commented 3 months ago

We are relying on several external APIs through parse-play and parse-tunes. I have already implemented caching to reduce the number of calls we need to make. But we still need to make sure to:

  1. Throttle our requests to them so we don't get ratelimited.
  2. Ratelimit the requests to ourselves that cause external API requests to ensure that everyone can fairly access our service.
baltpeter commented 3 months ago

I have already implemented 2. as part of #9.

For 1., we can also use the rate-limiter-flexible library, see: https://github.com/animir/node-rate-limiter-flexible/wiki/Overall-example#third-party-api-crawler-bot-rate-limiting