tencent cloud

All product documents
Tencent Cloud Mesh
Service Timeout Configuration
Last updated: 2023-12-26 10:45:52
Service Timeout Configuration
Last updated: 2023-12-26 10:45:52

Overview

The order service has a timeout period of three seconds as shown below:


After fault injection is configured for the stock service, it is found that user requests to the website will be in the waiting status due to the fault. To optimize the browsing experience, a timeout period needs to be configured.

Directions

Configure a timeout period of three seconds for the order service by applying the following VirtualService and no timeout period for the cart service.
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: order-vs
namespace: base
spec:
hosts:
- order.base.svc.cluster.local
http:
- match:
- headers:
cookie:
exact: vip=false
route:
- destination:
host: order.base.svc.cluster.local
subset: v1
timeout: 3000ms
- match:
- headers:
cookie:
exact: vip=true
route:
- destination:
host: order.base.svc.cluster.local
subset: v2
timeout: 3000ms
After the configuration, add an item to the cart, and the cart service will experience an access latency of seven seconds due to the injected fault, without a timeout. Then, click CHECKOUT to start the checkout process and call the order service, and, in addition to the access latency of seven seconds, the order service will experience a timeout period of three seconds, which means a timeout will occur if no operation is performed within three seconds after the order service is called. The timeout occurring when the cart service calls the order service is as shown below:


After completing the timeout configuration and the fault injection test on the service, delete the VirtualService resource associated with the stock service to disassociate the configured fault injection policy from the stock service.
Delete the VirtualService associated with the stock service as shown below:


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon