Rate-limit policies

  • Locate policy owners and proxy limits along the request path.
Diagram phase
100%
Istio ingress EnvoyOne API pod · Direct or ILPod Envoy processApplication JVMCurrent · policy ownership along the request pathAPI / businessrequestrequestAcceptedInvokeBusiness request reaches the selected site ingress. The TLS termination contract is documented separately.IncomingrequestRoutes plaintext/decrypted HTTP to eligible application endpoints. An opaque application TLS stream cannot use HTTP-header routing here.HTTP routeThe envoy.filters.http.local_ratelimit HTTP filter executes inside this Envoy process. It consumes a local token bucket; it is not a separate network service. Replica count affects aggregate allowance. Local ratelimitThe sidecar forwards to the application in the same pod. A local token bucket is distinct from the proposed active-request and bounded-pending limits.Inboundconnection poolProduct routing, local APIGW/SMS compatibility and flavour extension execute in the owning Direct or IL JVM.CMC-OBRHrequest handlingAcceptedInvoke

Select a component to trace its direct connections. Drag to pan · Ctrl + wheel or pinch to zoom.

  • After ingress selects the Pod, the local rate limiter runs in that Pod’s Envoy. Each replica has its own bucket. A burst concentrated on one replica can exhaust that bucket while another has tokens.
  • An admitted request still needs an upstream stream and application capacity. Slow provider calls can leave many requests outstanding at a steady arrival rate.
Envoy sidecar rate limits

Envoy sidecar rate limits

  • The limiter is a filter inside each application Pod's Envoy. Effective coverage on every live workload is unverified. The local token bucket consumes arrivals and refills over time. A normal process-local bucket is not one shared allowance across replicas; restart, rollout and skew change the aggregate admission envelope. A slow provider can increase outstanding work even at a stable arrival rate.
  • 01-local-rate-limit.yaml is a simplified, commented reconstruction of the mechanism, not a copy of deployed values. Existing URL/group descriptors must be retained when changing actual configuration.
Illustrative local token bucketyaml
# Illustrative Istio EnvoyFilter v3 API example; NOT an installed OBRH manifest.
# Reconcile the existing filter instead of installing a second local limiter.
# Intended scope: the HTTP inbound listener of each matching Pod Envoy.
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: example-obrh-local-rate-limit
  namespace: obrh-example
spec:
  workloadSelector:
    labels:
      app: obrh-direct-example
  configPatches:
  - applyTo: HTTP_FILTER
    match:
      context: SIDECAR_INBOUND
      listener:
        portNumber: 8080
        filterChain:
          filter:
            name: envoy.filters.network.http_connection_manager
            subFilter:
              name: envoy.filters.http.router
    patch:
      operation: INSERT_BEFORE
      value:
        name: envoy.filters.http.local_ratelimit
        typed_config:
          '@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
          stat_prefix: obrh_local_admission
          # One proxy-process bucket, not a quota shared by replicas.
          local_rate_limit_per_downstream_connection: false
          token_bucket:
            max_tokens: 100 # Illustrative initial/burst allowance.
            tokens_per_fill: 100 # Illustrative refill, not a concurrency setting.
            fill_interval: 1s
          filter_enabled:
            runtime_key: obrh_local_admission_enabled
            default_value:
              numerator: 100
              denominator: HUNDRED
          filter_enforced:
            runtime_key: obrh_local_admission_enforced
            default_value:
              numerator: 100
              denominator: HUNDRED
# This simple example intentionally has no URL/group descriptors.
# Preserve existing descriptor buckets/actions when adapting the real policy.
# INSERT_BEFORE router alone does not prove placement before a body-buffer filter.
# Verify actual filter order; choose the intended pre-buffer admission placement.