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

Route burst limit #243

Merged
merged 3 commits into from
May 10, 2023
Merged

Route burst limit #243

merged 3 commits into from
May 10, 2023

Conversation

dirkhh
Copy link
Contributor

@dirkhh dirkhh commented May 7, 2023

Working with this for a couple of weeks we noticed two issues:

  • the batches became to big, especially when users zoomed out at an aggregator site and suddenly thousands of routes were requested
  • the user experience wasn't great with the five and then ten second waits
    This patch series limits each individual route API call to a maximum of 100 callsigns and in return allows those calls once every second. This reduces the burst load on the route API server and improves the user experience.
    The code has been tested on a production server :)
    Thanks to Katia for the idea and the testing.

dirkhh added 3 commits May 7, 2023 14:23
Never send more than 100 callsigns to the route server. If there
are more queued up (for example on an aggregator when the user
zooms out), they are sent in batches of 100 callsigns every 10
seconds.

Signed-off-by: Dirk Hohndel <[email protected]>
With the limit of 100 callsigns per API call, sending these
requests every second should create a more responsive experience
while still not overloading the server.

Signed-off-by: Dirk Hohndel <[email protected]>
Again, aiming for a more responsive look and feel.

Signed-off-by: Dirk Hohndel <[email protected]>
@dirkhh
Copy link
Contributor Author

dirkhh commented May 10, 2023

Pinging @wiedehopf ... any chance this could get merged. Completely invisible to anyone not enabling the routes.
But potentially painful for poor @katlol 's server. And she has too much integrity to just limit the requests on her end while users of the upstream might still send her huge requests due to the choices that I made when implementing this the first time. So I feel a little bad about this.
I'll buy you a virtual beer on the discord of your choice?

@dirkhh
Copy link
Contributor Author

dirkhh commented May 10, 2023

It's three really tiny, painfully simple and obvious changes. With detailed commit messages.
An open source maintainer's dream, really.
😇🤣

@wiedehopf wiedehopf merged commit c2f0a0f into wiedehopf:master May 10, 2023
@dirkhh dirkhh deleted the routeBurstLimit branch May 10, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants