Skip to content
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

As a Open Data Hub maintainer I want a quota to limit the amount of historical data that can be requested in a single call #261

Open
3 tasks done
dulvui opened this issue Nov 21, 2022 · 10 comments

Comments

@dulvui
Copy link
Contributor

dulvui commented Nov 21, 2022

  • meeting the 11th of April to discuss the limit to set
  • Migrate our elaborations to use credentials and not been limited by the quota
  • set the limit agreed

To prevent big queries that slow down or even bring our Mobility API down a quota that limits requests for more than a give time frame should receive a quota message, like we have for max requests per second.
To be fast, the implementation should be made to first introduce the limit and then implement the logic to allow bigger requests to certain users. So we implement the easy limit fast and the more complicated logic only if its really needed.

TODO:
@sseppi organize a dedicated meeting in the whole team, to discuss if this limits have any benefits or only through backs:

  • PRO: Maybe against DoS attacks? @clezag thinks not.
  • CONS: Data more difficult to access by students and others who would need the histroical data.
@clezag
Copy link
Member

clezag commented Mar 28, 2023

Implementation has already been done.
What's left is to define the actual time ranges and how to move into production (communication to clients etc.)

@clezag
Copy link
Member

clezag commented Apr 14, 2023

Before defining any policies, we will first analyze the API logs and figure out which kinds of users are currently making historical data requests, and which ranges they request

@ohnewein ohnewein assigned sseppi and unassigned dulvui and clezag Apr 28, 2023
@clezag
Copy link
Member

clezag commented Jun 5, 2023

Limits have been disabled in test (can be configured by setting corresponding env variables in CI/CD)

@ohnewein ohnewein changed the title As a Open Data Hub maintainer I want a quota to limit the amount of historical data that can be requested in on call As a Open Data Hub maintainer I want a quota to limit the amount of historical data that can be requested in a single call Aug 18, 2023
@clezag
Copy link
Member

clezag commented Apr 12, 2024

Decisions made on 11.04.2024:

We will start with a quota limit of

  • 5 days anonymous
  • 100 days referer
  • 1000 days basic
  • open for advanced and premium

According to the lo statistics, there seems to be only one elaboration type 3rd party application that is expected to be impacted immediately by this quota (parking prediction by Chris Mair).

  • Coordinate with Chris Mair about the parking prediction elaboration
  • make all our internal elaborations use credentials
    • bluetooth traffic (no ninja request - direct sql)
    • env-a22-averages (already using credentials)
    • env-a22-nlc (already using credentials)
    • skyalps-gtfs (only uses station data)
    • parking-free (uses 4 weeks windows - referer implemented)
    • pollution v1 (already uses credentials)
    • pollution v2 (already uses credentials)
    • traffic a22 data quality (already uses credentials - might need to enable quota on them)
  • Review data visualizations (webcomponents, databrowser, analytics) to handle the quota limit case properly
  • Update documentation / website with new limits
  • Notify customers about the change

clezag added a commit to noi-techpark/it.bz.opendatahub.api.mobility-ninja that referenced this issue Jul 22, 2024
@clezag
Copy link
Member

clezag commented Aug 22, 2024

Proposing production date: 11.09.
Do we need to notify customers beforehand?

@sseppi
Copy link

sseppi commented Aug 22, 2024

In september we foresee to send out the next Community Update mail, what about communicating the change in the community email and put everything into production just after the communication?

@clezag
Copy link
Member

clezag commented Aug 22, 2024

That's fine for me. I just needed a date to communicate to Chris, so we have an agreed deadline. We can postpone the actual release. Do you have a concrete date?

@sseppi
Copy link

sseppi commented Aug 22, 2024

@clezag we foresee to send out the community update the last week of september, probably the 24th or the 25th.

@rcavaliere
Copy link
Member

@sseppi reminder for you: please notify Emily to include this point in the next community update.

@sseppi
Copy link

sseppi commented Sep 23, 2024

@rcavaliere Is alredy included in the text Emily presented at the last meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants