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

Stats requests failing too often in cascade #33

Open
haggen opened this issue Sep 20, 2020 · 0 comments
Open

Stats requests failing too often in cascade #33

haggen opened this issue Sep 20, 2020 · 0 comments
Labels

Comments

@haggen
Copy link
Owner

haggen commented Sep 20, 2020

zKillboard has an aggressive throttling in place in which I can only make a single request every second. Right now I have a regular interval of 1 second, where I dispatch a request on very tick. The problem is when a request takes too long the next one might come too soon and then it gets throttled.

The pattern I've seen is that the first few dozen requests takes about 50ms. But then this time begins to increase with each request, taking up to 1–1.5s. That's when the cascading failures start. Once a request takes more than the, all the following ones fail as well.

  • One option is to put 1 second between requests, instead of dispatching in a regular interval of 1 second. i.e. dispatch a request, wait for it to finish, dispatch the next one. But this would really ramp up the time it takes to fill the stats.
  • Another option is to apply a dynamic interval between them, increasing as the requests take longer and decreasing otherwise.
@haggen haggen added bug next and removed Next labels Sep 20, 2020
@haggen haggen added this to the Next milestone Sep 22, 2020
@haggen haggen removed this from the Next milestone Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant