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

Limit number of requested points from the database #204

Open
shaardie opened this issue Feb 16, 2020 · 0 comments
Open

Limit number of requested points from the database #204

shaardie opened this issue Feb 16, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@shaardie
Copy link
Contributor

We have a lot of data in our database and currently no mechanism to limit the maximal number of requested points from the database, which makes it pretty easy to overload our service.

This does not have to be on purpose. It could simply happen by accident.

Limiting the number of geo.jon points is pretty straight forward, but limiting the number of data points involved in calculations in average.json and statistics.json is more complicated.

My approach would be the following:

We can calculate the average density d of the points we have per day. Then for every request we get a polygon p and a timespan t from the user.

So we can estimate the number of involved points with d*p.area*t.

With this estimation we can directly stop the query with a proper error message.

@shaardie shaardie added the enhancement New feature or request label Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant