-
Task
-
Resolution: Not a Bug
-
Minor
-
None
-
2.13.1 GA
-
None
-
False
-
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
-
According to our own documentation, a limit can be configured with different scope
scope: Defines the scope of the key. The supported scopes are:
- Per service scope that affects one service (service).
- Global scope that affects all the services (global).
However, in my testing, the `fixed_window` limit will work the same regardless of the scope.
Checking the code , I can see that a timestamp is added to the key, so unless two products configure the edge limit policy at the same time, the `fixed_window` limit will always work the same regardless of the scope.
Test steps:
- Configure product_1 with Edge Limiting policy using `fixed_window` limit with
- Key: "generic_key"
- Scope: "global"
- Window: 60
- Count: 4
- Configure product_2 with Edge Limiting policy using `fixed_window` limit and the same key `generic_key`.
- Key: "generic_key"
- Scope: "global"
- Window: 60
- Count: 2
- Send 4 requests to product_1 tillĀ 429 is returned, as the limit is configured with `global` scope, I expect the next request to product_2 will also return 429
- Send 2 requests to product_2 both will return 200
- A third request to product_2 will now return 429