Hi Guys,
I am here newbie on Istio. I am doing some POC on service mesh on Amazon EKS.
I am using Istio demo profile. traffic is working fine from both services.
Here I am trying to create some delay on every request about 8 seconds but it is not working. can someone help on this?
Below code i am using:
kind: VirtualService apiVersion: networking.istio.io/v1alpha3 metadata: name: test namespace: test selfLink: >- /apis/networking.istio.io/v1alpha3/namespaces/test/virtualservices/test uid: f4826b68-3b63-11ea-b800-125b224c8bc5 resourceVersion: '9119063' generation: 2 creationTimestamp: '2020-01-20T09:05:07Z' annotations: kubectl.kubernetes.io/last-applied-configuration: > {"apiVersion":"networking.istio.io/v1alpha3","kind":"VirtualService","metadata":{"annotations":{},"name":"test","namespace":"test"},"spec":{"gateways":["test-info"],"hosts":["*.test.svc.cluster.local"],"http":[{"fault":{"delay":{"fixedDelay":"8s","percentage":{"value":100}}},"match":[{"uri":{"exact":"/test"}}],"route":[{"destination":{"host":"test.test.svc.cluster.local","port":{"number":8093},"subset":"v1"},"weight":50},{"destination":{"host":"test.test.svc.cluster.local","port":{"number":8093},"subset":"v2"},"weight":50}]}]}} spec: hosts: - '*.test.svc.cluster.local' gateways: - test-info http: - fault: delay: fixedDelay: 8s percentage: value: 100 match: - uri: exact: /test route: - destination: host: test.test.svc.cluster.local port: number: 8093 subset: v1 weight: 50 - destination: host: test.test.svc.cluster.local port: number: 8093 subset: v2 weight: 50
After deploy delay. I am testing with time command:
time curl -I test.us-west-2.elb.amazonaws.com/test -H ‘name: test’
> real 0m0.889s
> user 0m0.006s
> sys 0m0.008s
Thanks