Skip to content

Latest commit

 

History

History
90 lines (74 loc) · 2.21 KB

traffic-management.md

File metadata and controls

90 lines (74 loc) · 2.21 KB
title layout prism_languages weight tags updated category intro
Traffic Settings Management
2017/sheet
bash
yaml
-3
Featured
2022-12-07
Resources

Intro

Resources

  • TrafficGroup allow grouping the proxy workloads in a set of namespaces owned by its parent workspace
  • ServiceRoute Define versions of services with traffic shifting policies
  • TrafficSetting Define behavior of proxy workloads

tsb/traffic/v2

ServiceRoute

Sample

sample/traffic-management/serviceroute.yaml

apiVersion: traffic.tsb.tetrate.io/v2
kind: ServiceRoute
Metadata:
  organization: tsbdemo
  tenant: bookinfo
  workspace: bookinfo-workspace
  group: bookinfo-trafficgroup
  name: bookinfo-tg-reviews
spec:
  service: bookinfo/reviews.bookinfo.svc.cluster.local
  stickySession:
    useSourceIp: true
  subsets:
    - name: v1
      labels:
        version: v1
      weight: 50
    - name: v2
      labels:
        version: v2
      weight: 50

Fields

Interpretations of fields in the sample

  • service: which service configuration will be applied
  • stickySession: how to keep traffic from client to a specific backend
  • subsets: a list of versions with traffic weights

TrafficSetting

Sample

sample/traffic-management/trafficsetting.yaml

apiVersion: traffic.tsb.tetrate.io/v2
kind: TrafficSetting
metadata:
  organization: tsbdemo
  tenant: bookinfo
  workspace: bookinfo-workspace
  group: bookinfo-trafficgroup
  name: bookinfo-tg
spec:
  resilience:
    httpRetries:
      attempts: 3
      perTryTimeout: 3s
      retryOn: 5xx,gateway-error,reset

Fields

Interpretations of fields in the sample

  • resillience: traffic reliability knobs
  • httpRetries: retry policy for all HTTP requests