Skip to content

Conversation

@jefflembeck
Copy link
Contributor

This here monthly rate limiter class is a quick and dirty way to make
sure we don't get hit by more than 50 tests from a specific IP address
of an anonymous user in a 31 day period. We can set those numbers to
higher numbers or lower numbers, though.

This should probably be done with something sturdier (see: redis), but for
right now uses the APCU plugin, which is what we use for our rate
limiting for 3 minute long periods already. It will lose track of things
when the machine gets restarted but I don't think we care that much,
for now.

This here monthly rate limiter class is a quick and dirty way to make
sure we don't get hit by more than 50 tests from a specific IP address
of an anonymous user in a 31 day period. We can set those numbers to
higher numbers or lower numbers, though.

This should probably be done with something sturdier (see: redis), but for
right now uses the APCU plugin, which is what we use for our rate
limiting for 3 minute long periods already. It will lose track of things
when the machine gets restarted but I don't think we care _that_ much,
for now.
Copy link
Contributor

@scottjehl scottjehl left a comment

Choose a reason for hiding this comment

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

This looks fantastic. Great work, @jefflembeck

Copy link
Contributor

@tkadlec tkadlec left a comment

Choose a reason for hiding this comment

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

Rock-solid work @jefflembeck! And moar tests! :)

@tkadlec tkadlec merged commit e9b7330 into master Oct 28, 2021
@jefflembeck jefflembeck deleted the rate-limit-monthly branch October 28, 2021 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants