Page MenuHomePhabricator

rest gateway: support multiple rate limit policies per route
Closed, ResolvedPublic

Description

We need to be able to apply more than one ratelimit policy to a route. So we would not have a single default policy but a list of policies. And for each route, there would not be a single override, but a list of additional policies, and a flag for ignoring the defaults.

Use cases:

  • have a proposed policy in shadow mode to collect data while still enforcing the old policy
  • have a request-counting polic in place while also deploying a cost-based policy

Question: would it be sufficient to simply set x-wmf-ratelimit-policy multiple times? Will that make the ratelimit extension generate multiple descriptors?

Event Timeline

Blake triaged this task as Low priority.Jan 15 2026, 9:45 AM
Blake raised the priority of this task from Low to Medium.Jan 15 2026, 11:40 AM
Blake edited projects, added ServiceOps new; removed serviceops-deprecated.
daniel renamed this task from rest gateway: support multiple rate limits per route to rest gateway: support multiple rate limit policies per route.Jan 16 2026, 10:28 AM

Change #1228218 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[operations/deployment-charts@master] rest route: support multiple rate limit policies at once

https://gerrit.wikimedia.org/r/1228218

daniel changed the task status from Open to In Progress.Feb 18 2026, 1:48 PM

Change #1228218 merged by jenkins-bot:

[operations/deployment-charts@master] rest route: support multiple rate limit policies at once

https://gerrit.wikimedia.org/r/1228218

Change #1240753 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[operations/deployment-charts@master] rest-gateway: fix x-wmf-ratelimit-policy in access log

https://gerrit.wikimedia.org/r/1240753

Change #1240753 merged by jenkins-bot:

[operations/deployment-charts@master] rest-gateway: fix x-wmf-ratelimit-policy in access log

https://gerrit.wikimedia.org/r/1240753

daniel claimed this task.

deployed and working