POC request flow

  • Trace route selection, token checks, buffering and forwarding or local rejection.
100%

OBRH POC 0.1.3 example · prepared configuration; no live deployment claim

Request execution · OBRH POC exampleFour views show configuration objects, request rejection, runtime state, and generic Envoy internal architecture. Sections A to C use prepared POC examples, not live deployment evidence. Section D shows the generic TCP and HTTP1-2 architecture. Request execution · OBRH POC example Example: REQUEST-URL = U1 · PRODUCT-PROCESSOR = FCUPI · any HTTP method ONE ENVOY SIDECAR · HTTP decode direction → Caller HTTP request HCM / route lookup Decode headersSelect/cache route A2Available before router local_ratelimit Read selected route actionsBuild path / pp descriptorsConsume runtime tokens C1 buffer Read / buffer bodyLimit: 1,000,000 BWait for full body router Read route.clusterChoose named clusterGet upstream stream debitCreditTxn-v2Active-request counter / limit: n / 50Own pools → 127.0.0.1:8080 inbound|8080||Active-request counter / limit: m / 200Own pools → 127.0.0.1:8080 Application Same poc-cmc JVM127.0.0.1:8080Outside Envoy U1 else Select ONE cluster; do not traverse both 429 · token check denied 413 · body too large 503 / UO · pool or breaker overflow LOCAL REPLY → callerJVM not called x-local-rate-limit: true Route lookup happens before router forwarding

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

  • The selected HTTP route tells the local rate limiter which header values to use. A request can receive 429 at the limiter or 413 at the body buffer before the router attempts an upstream call.
  • At the router, only the selected cluster supplies a connection to the application. A 503 with the UO overflow flag can indicate exhausted upstream capacity. Check the cluster’s counters to identify the exhausted resource.
URL cluster · 50 active requests

URL cluster · 50 active requests

Istio 1.22.6 · Envoy 1.30.7 · prepared chart 0.1.3

The separately added cluster

This exact CLUSTER / ADD excerpt defines the object referenced by Route 1. It names the explicit loopback endpoint and sets that cluster’s active-request threshold.

Exact CLUSTER / ADD patchyaml
  - applyTo: CLUSTER
    match:
      context: SIDECAR_INBOUND
    patch:
      operation: ADD
      value:
        name: debitCreditTxn-v2
        type: STATIC
        load_assignment:
          cluster_name: debitCreditTxn-v2
          endpoints:
          - lb_endpoints:
            - endpoint:
                address:
                  socket_address:
                    address: 127.0.0.1
                    port_value: 8080
        circuit_breakers:
          thresholds:
          - max_requests: 50

Same address, different accounting

STATIC means the endpoint is supplied in load_assignment; it needs neither DNS resolution nor a separate EDS subscription. Istiod can still update the cluster through CDS. The same endpoint address in two cluster objects does not share their pools or request counters.

What this fragment leaves unset

Only max_requests is set. Raw Envoy defaults remain for omitted thresholds, including 1,024 connections and 1,024 pending requests in the examined version. This does not configure a zero-length queue or clone the ordinary inbound cluster’s policy. A second independent URL budget needs another named cluster and an explicit matching route; several routes can deliberately share one cluster.

Ordinary inbound cluster · 200 active requests

Ordinary inbound cluster · 200 active requests

Istio 1.22.6 · Envoy 1.30.7 · prepared chart 0.1.3

The Sidecar that owns the ordinary pool

This is the exact prepared Sidecar. inboundConnectionPool.http.http2MaxRequests: 200 sets active HTTP requests on the ordinary inbound pool. The field applies to HTTP/1.1 as well as HTTP/2. kind: Sidecar configures a proxy that already exists; it does not create or inject the proxy container.

Full prepared Sidecaryaml
---
# Source: poc/templates/sidecar.yaml
apiVersion: networking.istio.io/v1beta1
kind: Sidecar
metadata:
  name: poc-sidecar
  namespace: "poc-iut-ns"
spec:
  workloadSelector:
    labels:
      app: poc-cmc
  inboundConnectionPool:
    http:
      http2MaxRequests: 200
  egress:
  - hosts:
    - "~/*"
  ingress:
  - port:
      number: 8080
      protocol: HTTP
      name: http-8080
    defaultEndpoint: 127.0.0.1:8080

The custom cluster bypasses this counter

The fallback route references inbound|8080||; Route 1 references debitCreditTxn-v2 instead. The two thresholds can therefore allow approximately 200 + 50 active proxy requests to the same application, subject to other limits and cross-worker accounting. This is not an exact JVM semaphore or a shared service-wide allowance. The manifest sets no explicit pending-request limit.

Version and scope differences

Upstream Istio 1.21 introduced the Sidecar inbound connection-pool fields. Earlier APIs cannot be assumed to accept them. Per-port Sidecar pool settings override its top-level pool, ahead of applicable DestinationRule settings; the pool configurations are replaced rather than merged field by field. The prepared ~/* egress scope restricts imported outbound configuration; it is not a firewall or a guarantee that outbound packets bypass the proxy.

Rate descriptors · actions versus buckets

Rate descriptors · actions versus buckets

Istio 1.22.6 · Envoy 1.30.7 · prepared chart 0.1.3

Definitions belong to the installed limiter

poc-base-ef installs the local-rate-limit filter once. poc-url-ratelimit-ef and poc-group-ratelimit-ef merge bucket definitions into it. This combined fragment illustrates their Direct configuration after composition; each entries list is one descriptor, so URL and group are independent matches.

Illustrative composed URL and group bucket definitionsyaml
# Illustrative combined typed_config excerpt after the URL/group MERGE patches.
# The two definitions belong to the existing local_ratelimit filter.
# Not a live config dump or a complete filter manifest.
descriptors:
- entries:
  - key: path
    value: /clearing-settlement/casa-payment-upi/debitCreditTxn/v2
  token_bucket:
    max_tokens: 1000
    tokens_per_fill: 1000
    fill_interval: 1s
- entries:
  - key: pp
    value: FCUPI
  token_bucket:
    max_tokens: 1000
    tokens_per_fill: 1000
    fill_interval: 1s

Actions belong to the selected route

Route actions translate the existing request headers to path and pp descriptors. Matching descriptors select the definitions above; mutable token balances live in the runtime limiter. The successful prepared request needs available tokens in its matching URL and group buckets plus the default bucket. Neither these actions nor the bucket definitions set a concurrency allowance.

Default bucket and enforcement

This exact base-filter excerpt enables and enforces checks at 100% by default, and keeps default-bucket consumption enabled. Runtime controls can change enforcement. Capacity/refill of 1,000 per second is a token-bucket policy with bursts, not an exact rolling-window TPS promise.

Exact default limiter configuration excerptyaml
        name: envoy.filters.http.local_ratelimit
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
          stat_prefix: poc_inbound_local_rate_limit
          token_bucket:
            max_tokens: 1000
            tokens_per_fill: 1000
            fill_interval: 1s
          always_consume_default_token_bucket: true
          filter_enabled:
            runtime_key: poc_inbound_local_rate_limit_enabled
            default_value: { numerator: 100, denominator: HUNDRED }
          filter_enforced:
            runtime_key: poc_inbound_local_rate_limit_enforced
            default_value: { numerator: 100, denominator: HUNDRED }
          response_headers_to_add:
          - append_action: OVERWRITE_IF_EXISTS_OR_ADD
            header:
              key: x-local-rate-limit
              value: "true"
Request execution · where forwarding stops

Request execution · where forwarding stops

Istio 1.22.6 · Envoy 1.30.7 · prepared chart 0.1.3

Read the execution map from left to right

In the inspected Envoy path, HCM resolves/caches the route before HTTP decoder filters. The limiter can use that selected route’s descriptor actions before the router forwards anything. Route lookup is a local configuration lookup, not an extra network hop.

Three distinct rejection branches

Decision in the diagram Rejection Does the JVM receive this attempt?
Local-rate-limit tokens unavailable 429; prepared policy adds x-local-rate-limit: true No
Buffered body exceeds 1,000,000 bytes 413 No
Selected cluster cannot allocate upstream capacity Overflow can return 503 with UO No, through that failed allocation

The response still traverses encoder processing. A 503 alone does not prove overflow; UO alone does not identify whether pending, connection or active-request capacity failed.

Buffer configuration at the middle branch

This exact typed-config excerpt belongs to the buffer filter placed before the router. The diagram shows the relevant custom filters, not every built-in Istio security or transport filter.

Exact buffer configuration excerptyaml
        name: envoy.filters.http.buffer
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.http.buffer.v3.Buffer
          max_request_bytes: 1000000

Then choose exactly one cluster

If both filters permit the request, the router uses the selected route’s cluster reference. It does not traverse the 50 and 200 counters in sequence. Tokens consumed earlier are not refunded when buffering or allocation later rejects the request.