Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Remove RateLimitWatcher, keep BasicLimitWatcher#51087

Merged
mrnugget merged 3 commits into
mainfrom
mrn/remove-rate-limiter
Apr 25, 2023
Merged

Remove RateLimitWatcher, keep BasicLimitWatcher#51087
mrnugget merged 3 commits into
mainfrom
mrn/remove-rate-limiter

Conversation

@mrnugget

Copy link
Copy Markdown
Contributor

The RateLimitWatcher was unused. According to
8726839 the BasicLimitWatcher was introduced as a simplified version:

There was already a much more sophisticated, but currently disabled,
rate limiter in place that currently undergoes testing. This new
limiter is a heavily simplified version of the existing limiter which we
can use for the time being.

In the 2 years since no one enabled the other rate limiter.

Looks like we might need something like the more sophisticated rate limiter again, but I'm unsure what the requirements are and what held the "more sophisticated" rate limiter back.

Test plan

  • Existing tests

The `RateLimitWatcher` was unused. According to
8726839 the `BasicLimitWatcher` was
introduced as a simplified version:

> There was already a much more sophisticated, but currently disabled,
> rate limiter in place that currently undergoes testing. This new
> limiter is a heavily simplified version of the existing limiter which we
> can use for the time being.

In the 2 years since no one enabled the other rate limiter.

Looks like we might need something like the more sophisticated rate
limiter again, but I'm unsure what the requirements are and what held
the "more sophisticated" rate limiter back.
Comment thread schema/site.schema.json

@stefanhengl stefanhengl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Quoting from my PR you referenced in the description

The basic rate limiter from this PR was introduced to fight an attacker from last year. I believe the disabled limiter was more sophisticated and tried to estimate things like a "query cost". I am not aware that any work on rate limiting happened since then.

That's still accurate AFAIK.

@mrnugget

Copy link
Copy Markdown
Contributor Author

That's still accurate AFAIK.

Yep. Does that mean we should keep it around here?

@stefanhengl

Copy link
Copy Markdown
Member

... Does that mean we should keep it around here?

No no. Definitely remove the unused one.

@mrnugget mrnugget merged commit 02ee3e7 into main Apr 25, 2023
@mrnugget mrnugget deleted the mrn/remove-rate-limiter branch April 25, 2023 15:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants