Skip to content

A quota_scheduler's denied_response_status_code setting doesn't work #3263

@jgoeres

Description

@jgoeres

Due to #3258 I am currently creating a few simple policies manually based on examples and the Policy Language Spec https://docs.fluxninja.com/reference/configuration/spec.
I defined a few policies for different "QoS classes", like this one:

apiVersion: fluxninja.com/v1alpha1
kind: Policy
metadata:
  labels:
    fluxninja.com/validate: "true"
  name: static-rate-limiting-tokens-platinum
spec:
  circuit:
    components:
      - flow_control:
          quota_scheduler:
            in_ports:
              bucket_capacity:
                constant_signal:
                  value: 20000
              fill_amount:
                constant_signal:
                  value: 20000
            out_ports:
              accept_percentage:
                signal_name: ACCEPT_PERCENTAGE
            scheduler:
              tokens_label_key: estimated_tokens
              # this doesn't work, still getting 503
              denied_response_status_code: "429"
            rate_limiter:
              interval: 60s
              continuous_fill: true
              limit_by_label_key: tenant
            selectors:
              - control_point: "awesome-feature-tokens"
                agent_group: default
                label_matcher:
                  match_list:
                    - key: qos
                      operator: In
                      values:
                      - platinum
[...]

Alas, despite setting the denied_response_status_code to 429, my simply Java test app receives 503 response codes for rejected requests.

I am running local agents and control plane, version 2.34.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions