Use Redis for one-time passcode sending rate limits#7725
Merged
mitchellhenke merged 6 commits intomainfrom Feb 3, 2023
Merged
Conversation
changelog: Internal, Rate Limiting, Use Redis for one-time passcode sending rate limits
aduth
reviewed
Jan 30, 2023
Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
aduth
reviewed
Jan 31, 2023
|
|
||
| # rubocop:disable Naming/MemoizedInstanceVariableName | ||
| def entry_for_current_phone | ||
| @entry ||= OtpRequestsTracker.find_or_create_with_phone_and_confirmed(phone, phone_confirmed) |
Contributor
There was a problem hiding this comment.
Same note about this method not being used anywhere and could be removed from OtpRequestsTracker.
Contributor
There was a problem hiding this comment.
Just to clarify, are we planning to drop the otp_requests_trackers table altogether at some point?
Contributor
Author
There was a problem hiding this comment.
Yeah, plan is to drop everything related to OtpRequestsTracker in this, and drop the table if we're content with the functionality.
23e13df to
7ea58d4
Compare
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🛠 Summary of changes
Followup to #7554. The major environments have been upgraded to enable the read flag and the remaining environments will have been writing to the Redis value since the previous PR was deployed, so we should be ok to start reading from Redis everywhere and dropping the database writes.