August 2019
Intermediate to advanced
256 pages
6h 43m
English
Istio lets you inject faults into the results pretty easily. This sounds counterproductive at the start, but can be a very nice way of testing that you get the fault tolerance handling right. The following VirtualService for Istio defines such fault injection:
apiVersion: networking.istio.io/v1alpha3kind: VirtualServicemetadata: name: fault-injection-servicespec: hosts: - myTarget http: - route: - destination: host: myTarget fault: abort: httpStatus: 404 percent: 20 delay: percent: 50 fixedDelay: 200ms
Istio will hear for calls to the destination host, myTarget, and send a 404 response for 20% of the calls instead of the real response code. On top of this, it will delay every other response by 200 milliseconds. ...
Read now
Unlock full access