Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jgoeres opened this issue May 6, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@jgoeres
Copy link

jgoeres commented May 6, 2024

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

@jgoeres jgoeres added the bug Something isn't working label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant