Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-10025

Clarify the behaviour of Edge Limiting Policy configued with `fixed_window` limit

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Not a Bug
    • Icon: Minor Minor
    • None
    • 2.13.1 GA
    • Gateway
    • None
    • False
    • Hide

      None

      Show
      None
    • 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

              Unassigned Unassigned
              rhn-support-atra An Tran
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: