liveBook · Manning

Header-based routing

As explained in Platform Engineering on Kubernetes

Header-based routing directs requests to a specific application version according to a designated HTTP request header.

Header-based routing directs requests to a tagged application revision through an HTTP header rather than a separate revision URL. It supports A/B testing and lets developers reach debugging or experimental versions while keeping the normal service URL unchanged. section 8.2.2

A Knative Serving workflow uses these steps:

  • Create traffic rules that assign a tag, such as version110, to the target revision while leaving normal traffic on the service’s existing route. section 8.2.2
  • Send requests with the designated HTTP header containing the tag name; use a browser extension such as ModHeader when testing from a browser. section 8.2.2

Targeting version110

Keep the standard Knative Service URL for ordinary requests, then configure a request header whose value identifies the version110 tag. Requests carrying that header reach the tagged revision, allowing developers to test the debugging version without changing the public URL. section 8.2.2

How Platform Engineering on Kubernetes covers it

How deep it goes
Explains tagging, feature activation, and browser testing, but defers detailed header syntax and broader traffic-management internals.
Examples
Uses a version110 tag, a Knative Service URL, kubectl configuration, and the ModHeader Chrome extension.
What it assumes
Assumes Knative traffic rules and revision tags; requires administrator access to patch the knative-serving ConfigMap.
What you can do after
Apply it via Knative Serving to expose a tagged revision through a custom request header.
How it connects
Connects HTTP headers with traffic splitting, revision tags, A/B testing, debugging, and blue/green deployments.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Platform Engineering on Kubernetes. The section links point to the parts of the book it draws on.