Skip to content

Split QuotaManager into generic and EppServer classes - #3213

Open
gbrodman wants to merge 1 commit into
google:masterfrom
gbrodman:refactorQuotaManager
Open

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

Conversation

@gbrodman

@gbrodmangbrodman 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
gbrodmanforce-pushed the refactorQuotaManager branch from 52205ac to 0eb76b5CompareAugust 18, 2026 17:01
@gbrodman
gbrodman requested a review from weiminyuAugust 18, 2026 17:10
Sign up for freeto 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.

1 participant

@gbrodman