-
Notifications
You must be signed in to change notification settings - Fork 258
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
feat(logger): rate limit based on peer address #1351
Merged
oddgrd
merged 21 commits into
main
from
feature/eng-1609-rate-limits-the-amount-of-logs-send
Nov 21, 2023
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a838d5a
feat(logger): rate limit based on peer address
oddgrd a8a9732
feat(proto): reduce log batch size
oddgrd 0f2d550
feat(logger): refactor out axum layer and dependency
oddgrd 2d42218
feat(deployer): handle rate limiting error for get_logs
oddgrd f179eae
refactor: increase batch & burst size
oddgrd 34a67e0
feat(logger): send warning to logger when rate limited
oddgrd ce32001
feat(logger): increase refresh rate of rate limiter to 2 RPS
oddgrd 5841342
fix(proto): clippy
oddgrd 0668981
tests(logger): refactor rate limiter to 2 RPS
oddgrd 36253fe
Merge branch 'main' into feature/eng-1609-rate-limits-the-amount-of-l…
oddgrd 6311872
refactor(deployer): match more common x-ratelimit-limit header
oddgrd 2404f5a
misc(logger): cleanups and comments
oddgrd f4bc9b6
Merge branch 'main' into feature/eng-1609-rate-limits-the-amount-of-l…
oddgrd 684fbc2
Merge remote-tracking branch 'upstream/main' into feature/eng-1609-ra…
oddgrd 58ec21d
chore: update lockfile
oddgrd c1df918
misc: rephrase errors, comments, constants
oddgrd eaa5e23
refactor: send deserializable error for log stream rate limit
oddgrd 6968f8c
feat: add ratelimited apierror variant
oddgrd b3c640e
Merge branch 'main' into feature/eng-1609-rate-limits-the-amount-of-l…
oddgrd b750e6e
refactor(logger): use downcast_ref in if clause
oddgrd b5705a9
docs(logger): remove todo
oddgrd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the not found case no longer relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think it ever was. The https://github.com/shuttle-hq/shuttle/blob/main/logger/src/lib.rs#L89-L100 call can fail in the following ways:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, after thinking about this some more, if the caller has access to this endpoint, but the logger client doesn't have access to get_logs, I think it makes sense to keep this as is, returning an internal error to the user from the deployer.