Linkerd 2.10 series

  • Linkerd V2 Service Mesh
  • Tencent Cloud K8S deployment Service Mesh — Linkerd2 & Traefik2 deployment emojivoto application
  • Learn about the basic features of Linkerd 2.10 and step into the era of Service Mesh
  • Linkerd 2.10(Step by Step) — 1. Add your service to Linkerd
  • Linkerd 2.10(Step by Step) — 2. Automated Canary publishing
  • Linkerd 2.10(Step by Step) — 3. Automatic rotation control plane TLS and Webhook TLS credentials

Linkerd 2.10 中文 版

  • linkerd.hacker-linner.com

To limit the amount of time Linkerd waits before an outgoing request to another service fails, you can configure a timeout. This is done by adding some additional information to the Service profile of the service to which you want to send requests.

Each route can define a timeout that specifies the maximum amount of time to wait for a response (including retries) to complete after sending a request. If this timeout is reached, Linkerd cancels the request and returns a 504 response. If this parameter is not specified, the default timeout is 10 seconds.

spec:
  routes:
  - condition:
      method: HEAD
      pathRegex: /authors/[^/]*\.json
    name: HEAD /authors/{id}.json
    timeout: 300ms
Copy the code

Monitor the timeout

A request that reaches a Timeout is canceled, returns a 504 Gateway Timeout response, and is counted as a failure for the purposes of effective success rate. Because the request is canceled before any actual response is received, the timeout does not count toward the actual request volume at all. This means that when the configuration times out, the effective request rate may be higher than the actual request rate. In addition, if a response is received when the timeout is exceeded, the request may be considered actually successful but valiably failed. This results in a lower effective success rate than the actual success rate.