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

Make rate limit behavior configurable for dropping or queuing #277

Merged
merged 4 commits into from
Mar 30, 2023

Conversation

matux
Copy link
Collaborator

@matux matux commented Mar 29, 2023

Description of the change

This is the final PR for 122305 following #276.

This PR introduces the ability to configure some behavior when dealing with rate limiting. Users can now specify whether they'd like to drop occurrences (and their API requests) that fall under rate limit, or keep them in the queue to be sent in the next window of time.

The default behavior is to drop the rate limited occurrence.

If there are persisted occurrences at the moment the application starts, and behavior is configured to drop occurrences, all the persisted occurrences will be removed iff the first attempt at sending a persisted occurrence is rate limited.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

Related issues

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers assigned
  • Issue from task tracker has a link to this pull request
  • Changes have been reviewed by at least one other engineer

@matux matux self-assigned this Mar 29, 2023
Copy link

@ijsnow ijsnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔢

@matux matux merged commit 80a4cd4 into master Mar 30, 2023
@matux matux deleted the rate_limit_drop branch March 30, 2023 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rate limiting isn't handled correctly which results into more requests to be sent
2 participants