liveBook · Manning

Traffic splitting

As explained in Platform Engineering on Kubernetes

Percentage-based traffic splitting distributes requests among application versions according to configured traffic percentages.

Traffic splitting distributes requests between application versions by assigning percentages to service revisions. It supports canary releases by running stable and new versions side by side, then increasing the new version’s share as confidence grows. section 8.2.2 section 8.1.1

A Knative rollout typically follows these steps:

  • Start with 100% of traffic routed to the latest revision by default. section 8.2.2
  • Edit the Knative Service’s spec.traffic rules to assign percentages to stable and new revisions. section 8.2.2
  • Send requests with curl to confirm that both revisions are serving responses. section 8.2.2
  • Increase the new revision’s percentage after validation, or return 100% to the stable revision when problems appear. section 8.2.2
  • Keep all revision percentages totaling 100%; Knative can manage multiple revisions and scale the required ones. section 8.2.2

Splitting notifications-service traffic

Assign 50% of requests to notifications-service-00001 and 50% to the latest revision. Repeated curl requests return either version 1.0.0 or the improved version 1.1.0, allowing the new implementation to be checked before moving all traffic.

How Platform Engineering on Kubernetes covers it

How deep it goes
Explains configuration, validation, progressive rollout, rollback, scaling, and multi-revision percentage constraints.
Examples
Uses the notifications service, Knative YAML, kubectl edits, curl responses, and 50/50 revision traffic.
What it assumes
Builds on Kubernetes services, deployments, labels, and Knative Service terminology.
What you can do after
Apply it via Knative Service traffic rules, validate versions with curl, increase rollout percentages, or revert to the stable revision.
How it connects
Connects canary releases with Kubernetes services, Knative revisions, service meshes, and tag- or header-based routing.

Also explained in

Compare how 2 books explain traffic splitting →

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.