Skip to content

fix(allocation-policies): Base ReferrerGuardRail throttling on the referrer's limit - #8671

Open
dezzeddi wants to merge 3 commits into
masterfrom
dani/referrer-guard-rail-throttle-threshold
Open

dezzeddi wants to merge 3 commits into
masterfrom
dani/referrer-guard-rail-throttle-threshold

Conversation

@dezzeddi

@dezzeddi dezzeddi commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Fixes a bug where ReferrerGuardRailPolicy's throttle point was always calculated from the default limit (default_concurrent_request_per_referrer, 100 // 1.5 = 66) and never took referrer_concurrent_override into account. It now uses the referrer's own limit // requests_throttle_divider.

  • Referrers without an override are unchanged.
  • referrer_concurrent_override isn't set in any region today, so nothing changes yet.

…ferrer's limit

The throttle threshold was always default_concurrent_request_per_referrer //
requests_throttle_divider, even for a referrer with referrer_concurrent_override.
It now uses that referrer's effective limit. Referrers without an override are
unchanged.
@dezzeddi
dezzeddi marked this pull request as ready for review November 3, 2026 23:02
@dezzeddi
dezzeddi requested a review from a team as a code owner November 3, 2026 23:02

@ElioDiNino ElioDiNino 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.

Looks good but consider adding a test for the current behavior (where referrer_concurrent_override is not set), to ensure the default gets used

This branch has not been deployed

No deployments
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