title | layout | prism_languages | weight | tags | updated | category | intro | |||
---|---|---|---|---|---|---|---|---|---|---|
Traffic Settings Management |
2017/sheet |
|
-3 |
|
2022-12-07 |
Resources |
<a href='https://docs.tetrate.io/service-bridge/latest/en-us/refs/tsb/traffic/v2/yaml'>Traffic Settings Management</a> in TSB. |
- TrafficGroup allow grouping the proxy workloads in a set of namespaces owned by its parent workspace
ServiceRoute
Define versions of services with traffic shifting policiesTrafficSetting
Define behavior of proxy workloads
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
Interpretations of fields in the sample
service
: which service configuration will be appliedstickySession
: how to keep traffic from client to a specific backendsubsets
: a list of versions with traffic weights
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
Interpretations of fields in the sample
resillience
: traffic reliability knobshttpRetries
: retry policy for all HTTP requests