March 2020
Intermediate to advanced
626 pages
14h 45m
English
The bookinfo application that's been built by Istio's community of developers has hardcoded timeouts at 10 seconds for calls to the ratings service from reviews:v2:
...private JsonObject getRatings(String productId, HttpHeaders requestHeaders) { ClientBuilder cb = ClientBuilder.newBuilder(); Integer timeout = star_color.equals("black") ? 10000 : 2500;...
Let's inject a delay of 7 seconds for the end user, jason, for the ratings service:
# Script : 08-inject-http-delay-fault.yamlkind: VirtualServicemetadata: name: ratingsspec: hosts: - ratings http: - match: - headers: end-user: exact: jason fault: delay: percentage: value: 100.0 fixedDelay: 7s route: - destination: host: ratings
Read now
Unlock full access