Skip to content

Split QuotaManager into generic and EppServer classes - #3213

Merged
gbrodman merged 1 commit into
google:masterfrom
gbrodman:refactorQuotaManager
Aug 19, 2026
Merged

Split QuotaManager into generic and EppServer classes#3213
gbrodman merged 1 commit into
google:masterfrom
gbrodman:refactorQuotaManager

Conversation

@gbrodman

@gbrodman gbrodman commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

This separates the logic of "how many tokens should a particular user/group have" from "manage the quota given whatever limits, contacting Valkey".

This is in preparation for allowing other types of quota management and throttling besides just on the EPP server (e.g. domain-create throttling).

We also convert the expirations from seconds to milliseconds (and use a Duration so that this is masked from users). It's better to have the API use a full-fledged Duration object rather than an int, and this allows for finer control over expiration times.

Note that we'll probably want to use a sliding window in the future instead of a fixed window, but that's a problem for future us.


This change is Reviewable

This separates the logic of "how many tokens should a particular
user/group have" from "manage the quota given whatever limits,
contacting Valkey".

This is in preparation for allowing other types of quota management and
throttling besides just on the EPP server (e.g. domain-create
throttling).

We also convert the expirations from seconds to milliseconds (and use a
Duration so that this is masked from users). It's better to have the API
use a full-fledged Duration object rather than an int, and this allows
for finer control over expiration times.

Note that we'll probably want to use a sliding window in the future
instead of a fixed window, but that's a problem for future us.
@gbrodman
gbrodman force-pushed the refactorQuotaManager branch from 52205ac to 0eb76b5 Compare August 18, 2026 17:01
@gbrodman
gbrodman requested a review from weiminyu August 18, 2026 17:10

@weiminyu weiminyu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@weiminyu reviewed 9 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on gbrodman).

@gbrodman
gbrodman added this pull request to the merge queue Aug 19, 2026
Merged via the queue into google:master with commit 7f278d1 Aug 19, 2026
16 checks passed
@gbrodman
gbrodman deleted the refactorQuotaManager branch August 19, 2026 16:50
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.

2 participants