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

Add exponential backoff for failed requests #72

Open
yatharthranjan opened this issue Nov 4, 2024 · 2 comments
Open

Add exponential backoff for failed requests #72

yatharthranjan opened this issue Nov 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@yatharthranjan
Copy link
Member

yatharthranjan commented Nov 4, 2024

TO ensure that something like #62 does not happen in the future and to better handle consistent failure of requests (and avoid being banned by Garmin's systems), we should add support for exponential backoff at multiple levels:

  1. User level: If all the routes for a user fail, we should keep backing off exponentially for that user.
  2. Route level: If a route is failing for majority of the users, we should backoff exponentially for that route.
@yatharthranjan yatharthranjan added the enhancement New feature or request label Nov 4, 2024
@yatharthranjan
Copy link
Member Author

Some optimisations for the specific case in #62 are already added in #70

@yatharthranjan
Copy link
Member Author

yatharthranjan commented Nov 26, 2024

Another optimisation we can do is keep a cache of users with 401 still pushing the data. This way we can reply with 200 for users already removed or outdated in our systme back to garmin to reduce the errors reported on garmin portal. If possible we should fix #45 first

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