POC configuration

  • Inspect the OBRH example's route, cluster, Sidecar and rate-descriptor YAML by selecting each object.
100%

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

Configuration objects · 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. Configuration objects · OBRH POC example Istio inputs → xDS → listener / HCM · route table · named clusters app=poc-cmc · context: SIDECAR_INBOUND ISTIO INPUTS Sidecar / poc-sidecar ingress + endpointinbound pool setting: 200 poc-base-ef HTTP_FILTER: insertlocal_ratelimit + buffer URL / group rate-limit EFs HTTP_FILTER: merge bucketsHTTP_ROUTE: merge actions poc-url-concurrency-ef CLUSTER: ADDHTTP_ROUTE: INSERT_FIRSTTwo different Envoy objects istiodTranslateand merge→ xDS Configurationonly ENVOY CONFIGURATION IN MEMORY A1 · Listener → network filter HCMHCM.http_filters[] (LDS)1 local_ratelimit2 buffer3 router local_ratelimit.typed_config token_bucket: defaultdescriptors: path = U1 → URL token_bucket pp = FCUPI → group token_bucketalways_consume_default_token_bucket: true Bucket definitions A2 · RouteConfiguration → VirtualHost vhost: inbound|http|8080 HTTP route 1 · inserted firstmatch: prefix / + REQUEST-URL = U1action.cluster: debitCreditTxn-v2action.rate_limits: REQUEST-URL → descriptor path PRODUCT-PROCESSOR → descriptor pp HTTP route 2 · existing fallbackmatch: prefix / → inbound|8080||Also carries URL/group descriptor actions Inbound route_config: inline in LDSrate_limits: descriptor-generation rules A3 · Cluster manager (CDS) CLUSTER: debitCreditTxn-v2Explicitly added; type: STATICmax_requests: 50endpoint: 127.0.0.1:8080 CLUSTER: inbound|8080||Normal Istio inbound clustermax_requests: 200endpoint: 127.0.0.1:8080 Referenced by name; separate objects Route ≠ cluster Same endpoint ≠ shared pool No automatic cluster per URL

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

  • In the OBRH example, the first HTTP route matches a business URL in a request header and selects an added cluster with a 50-active-request limit. The fallback route selects the ordinary inbound cluster with its own limit of 200.
  • Both clusters point to the same application socket. Select Route 1 to inspect the match, then its cluster to see where the active-request threshold is configured.
Per-URL concurrency POC

Per-URL concurrency POC

Istio 1.22.6 · Envoy 1.30.7 · prepared chart 0.1.3

One application, two independent cluster budgets

This prepared OBRH example reuses the application in one Pod at 127.0.0.1:8080. The selected URL uses the added debitCreditTxn-v2 cluster with 50 active requests; other traffic uses the ordinary inbound cluster with 200. These are separate counters. The custom 50 does not consume the ordinary 200, and the arrangement supplies no combined 200 cap.

Follow the three maps

Start with Configuration to inspect the route match, cluster addition and existing rate policies. Execution follows a request through the 429, 413 and upstream-overflow branches. Runtime state separates refillable tokens from in-flight request counters. Select an object to open its configuration beside the map.

What was prepared

The Direct and IL manifests below are exact copies from the prepared chart previews. Direct matches REQUEST-URL; IL matches OBP-URL and its own business URL. Both omit a method predicate. The supporting Sidecar, existing base limiter, URL/group buckets and buffer are prerequisites. Configuration preparation is not evidence of a deployed policy or a successful load test.

Full prepared Direct EnvoyFilteryaml
---
# Source: poc/templates/envoyfilter-url-concurrency.yaml
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: poc-url-concurrency-ef
  namespace: "poc-iut-ns"
spec:
  # Stable ordering; route-policy inheritance is not implied by this priority.
  priority: -10
  workloadSelector:
    labels:
      app: poc-cmc
  configPatches:
  - 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
  - applyTo: HTTP_ROUTE
    match:
      context: SIDECAR_INBOUND
      routeConfiguration:
        vhost:
          name: inbound|http|8080
    patch:
      operation: INSERT_FIRST
      value:
        name: debitCreditTxn-v2
        match:
          prefix: /
          headers:
          - name: "REQUEST-URL"
            string_match:
              exact: "/clearing-settlement/casa-payment-upi/debitCreditTxn/v2"
        route:
          cluster: debitCreditTxn-v2
          timeout: 0s

          # Istio merges existing routes before inserting new ones. Carry the
          # enabled descriptor actions here; buckets remain in their own filters.
          rate_limits:

          - actions:
            - request_headers:
                header_name: "REQUEST-URL"
                descriptor_key: path


          - actions:
            - request_headers:
                header_name: PRODUCT-PROCESSOR
                descriptor_key: pp
Full prepared IL EnvoyFilteryaml
---
# Source: poc/templates/envoyfilter-url-concurrency.yaml
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: poc-url-concurrency-ef
  namespace: "poc-iut-ns"
spec:
  # Stable ordering; route-policy inheritance is not implied by this priority.
  priority: -10
  workloadSelector:
    labels:
      app: poc-cmc
  configPatches:
  - 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
  - applyTo: HTTP_ROUTE
    match:
      context: SIDECAR_INBOUND
      routeConfiguration:
        vhost:
          name: inbound|http|8080
    patch:
      operation: INSERT_FIRST
      value:
        name: debitCreditTxn-v2
        match:
          prefix: /
          headers:
          - name: "OBP-URL"
            string_match:
              exact: "/com.ofss.fc.cz.hdfc.obp.webservice/PIDebitCreditTxnRestWrapper/PIDebitCreditTxnRestWrapper"
        route:
          cluster: debitCreditTxn-v2
          timeout: 0s

          # Istio merges existing routes before inserting new ones. Carry the
          # enabled descriptor actions here; buckets remain in their own filters.
          rate_limits:

          - actions:
            - request_headers:
                header_name: "OBP-URL"
                descriptor_key: path


          - actions:
            - request_headers:
                header_name: PRODUCT-PROCESSOR
                descriptor_key: pp
Route 1 · URL match and descriptor actions

Route 1 · URL match and descriptor actions

Istio 1.22.6 · Envoy 1.30.7 · prepared chart 0.1.3

The inserted route

This exact patch excerpt adds the selected URL before the fallback. The outer match selects the configuration object in Istiod; patch.value.match becomes the per-request HTTP predicate. It requires the identity header and matches all HTTP methods. It is a fragment of the full EnvoyFilter, not a standalone manifest.

Exact HTTP_ROUTE / INSERT_FIRST patchyaml
  - applyTo: HTTP_ROUTE
    match:
      context: SIDECAR_INBOUND
      routeConfiguration:
        vhost:
          name: inbound|http|8080
    patch:
      operation: INSERT_FIRST
      value:
        name: debitCreditTxn-v2
        match:
          prefix: /
          headers:
          - name: "REQUEST-URL"
            string_match:
              exact: "/clearing-settlement/casa-payment-upi/debitCreditTxn/v2"
        route:
          cluster: debitCreditTxn-v2
          timeout: 0s

          # Istio merges existing routes before inserting new ones. Carry the
          # enabled descriptor actions here; buckets remain in their own filters.
          rate_limits:

          - actions:
            - request_headers:
                header_name: "REQUEST-URL"
                descriptor_key: path


          - actions:
            - request_headers:
                header_name: PRODUCT-PROCESSOR
                descriptor_key: pp

Why order and names matter

Envoy evaluates routes in order and uses the first match. INSERT_FIRST puts this match ahead of the catch-all. name labels the route; route.cluster points to the separately created cluster. Matching strings are a naming choice, not a rule that a route creates its cluster.

Preserve the existing rate policy

The two request_headers actions read gateway-supplied headers and produce separate descriptors: path=<REQUEST-URL> and pp=<PRODUCT-PROCESSOR>. They neither add HTTP headers nor create token buckets. In the inspected Istio route-patch order, existing-route merges precede new-route insertion, so this new route explicitly carries its actions. A sibling route supplies no inheritance.

Timeout and identity boundaries

timeout: 0s disables this raw Envoy route timeout. Omitting it uses Envoy’s 15-second RouteAction default; Istio VirtualService timeout omission instead defaults to disabled. Client, idle and application deadlines remain separate. The identity header must be set or normalized at the trusted entry path; arbitrary client headers do not prove which business operation runs.

Route 2 · existing fallback

Route 2 · existing fallback

Istio 1.22.6 · Envoy 1.30.7 · prepared chart 0.1.3

When Route 1 does not match

The ordinary catch-all still selects inbound|8080||. The shape below illustrates the existing route after the separate URL/group MERGE patches. It is not a live configuration export, and it omits unrelated generated fields.

Illustrative fallback route after policy mergesyaml
# Illustrative composed route shape, not an exported proxy config dump.
# Istio creates the fallback; the existing URL/group filters MERGE its actions.
# This is an explanation fragment, not a standalone EnvoyFilter manifest.
match:
  prefix: /
route:
  cluster: inbound|8080||
  rate_limits:
  - actions:
    - request_headers:
        header_name: REQUEST-URL
        descriptor_key: path
  - actions:
    - request_headers:
        header_name: PRODUCT-PROCESSOR
        descriptor_key: pp

Which policies still run

A missing or different REQUEST-URL falls through to this route. The selected route’s actions still attempt to create URL/group descriptors from present headers. The configured default rate bucket remains relevant even when no URL descriptor matches. A different URL can still match the FCUPI group bucket. The request selects one route and one cluster; carrying equivalent actions on two alternative routes does not charge it twice.

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.