Skip to content

pekko: show bucket a shed by the endpoint total - #1967

Merged
brharrington merged 1 commit into
Netflix:mainfrom
brharrington:fair-share-total-shed
Aug 11, 2026
Merged

pekko: show bucket a shed by the endpoint total#1967
brharrington merged 1 commit into
Netflix:mainfrom
brharrington:fair-share-total-shed

Conversation

@brharrington

Copy link
Copy Markdown
Contributor

A request has to pass the bucket limiter and the endpoint total. The bucket is tried first, so when the total is what refuses the request the bucket has already admitted it and the permits are handed back. That release was indistinguishable from a completed request, which disabled both halves of the fair-share policy for the shed caller: it accrued no demerit, so it never became a hog however hard it hammered, and it was never counted as wanting capacity, so the other callers kept a cap of the whole budget and could borrow all of it while it waited. Any endpoint whose dedicated buckets consume enough of the total for it to bind first had fair sharing in name only.

Add releaseDenied to ConcurrencyLimiter, defaulting to a plain release since a limiter that keeps no per-caller state cannot care, and have the endpoint use it for the rollback. FairShareLimiter records the caller as having attempted and been refused, exactly as if the bucket had refused it directly.

A shed that hands back nothing records nothing, which keeps a mis-paired call the no-op that release already is.

A request has to pass the bucket limiter and the endpoint total. The
bucket is tried first, so when the total is what refuses the request the
bucket has already admitted it and the permits are handed back. That
release was indistinguishable from a completed request, which disabled
both halves of the fair-share policy for the shed caller: it accrued no
demerit, so it never became a hog however hard it hammered, and it was
never counted as wanting capacity, so the other callers kept a cap of
the whole budget and could borrow all of it while it waited. Any
endpoint whose dedicated buckets consume enough of the total for it to
bind first had fair sharing in name only.

Add `releaseDenied` to ConcurrencyLimiter, defaulting to a plain release
since a limiter that keeps no per-caller state cannot care, and have the
endpoint use it for the rollback. FairShareLimiter records the caller as
having attempted and been refused, exactly as if the bucket had refused
it directly.

A shed that hands back nothing records nothing, which keeps a mis-paired
call the no-op that `release` already is.
@brharrington brharrington added this to the 1.9.0 milestone Aug 11, 2026
@brharrington
brharrington merged commit 3f40f3c into Netflix:main Aug 11, 2026
5 checks passed
@brharrington
brharrington deleted the fair-share-total-shed branch August 11, 2026 20:25
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.

1 participant