noi-techpark / bdp-core

Open Data Hub / Timeseries Core
https://opendatahub.com
Other
9 stars 4 forks source link

As an Open Data hub project manager I want the Quota (limit per number of requests) active on the Open Data Hub API in order to activate the "Quota" paid service. #241

Closed sseppi closed 2 years ago

sseppi commented 2 years ago

Priority: high Deadline: 15 April 2022

RudiThoeni commented 2 years ago

done a Test implementation from scratch (without a library) https://github.com/RudiThoeni/WebApiWithQuotas

where: -Response Message can be defined -i implemented 3 types, anonymous / with referer / logged user -Rate limit is added in form of Requests / sec -Rate Limit Headers added (found some standard)

will show it in the next meeting, if ok i add this to the tourism api.......

Piiit commented 2 years ago

@noi-techpark/ttdigital Quota for mobility is online, please test on https://mobility.api.opendatahub.testingmachine.eu ... You need to look at the response headers to see which quota policy has been chosen and how many calls are left or how long it takes to recover from used up limits... I have set 20 requests per second for GUEST accounts without referer, this means cached by IP + URL path... not easy to hit that limit manually. For a referer the limit is 100 r/s and for logged-in users 200 r/s... I kept the 100MB reponse size for everyone and the 30 second timeout also, to be sure that nobody kills the server... however, those limits exist now since a year and I did not see any issue with them until now.

The README misses that chapter... I will write it asap

RudiThoeni commented 2 years ago

New policy now is: https://tourism.opendatahub.bz.it/Test/TestQuotasettings

Piiit commented 2 years ago
Piiit commented 2 years ago

New policies explained here --> https://github.com/noi-techpark/odh-docs/wiki/Api-Quota

This is also the document linked as hint to the JSON error response of each API

Piiit commented 2 years ago

Basic, advanced and premium pricing policies implemented for the mobility API

Piiit commented 2 years ago

Mobility API done, documentation updated and last security issues tested and solved. Ready for production...

RudiThoeni commented 2 years ago

after going online we have to monitor the HTTP Status 429

ohnewein commented 2 years ago

We will activate Quota after the Open Data Hub Day.