What a budget belongs to, route-wise: one bucket per route, named by its declared path.
Both halves are load-bearing, and both were learnt from a limiter that got them wrong. Keying on
the handler alone made every endpoint of a controller share one bucket, so a request to one route
silently ate another's budget, under whichever limit happened to apply. Keying on the live pathname
goes too far the other way: a path carries resource codes, so rotating a code in the URL hands out
a brand-new budget.
What a budget belongs to, route-wise: one bucket per route, named by its declared path.
Both halves are load-bearing, and both were learnt from a limiter that got them wrong. Keying on the handler alone made every endpoint of a controller share one bucket, so a request to one route silently ate another's budget, under whichever limit happened to apply. Keying on the live pathname goes too far the other way: a path carries resource codes, so rotating a code in the URL hands out a brand-new budget.