Updated on 2025-04-25 GMT+08:00

Updating a Traffic Policy

Updating a Traffic Policy Using YAML

If access to the forecast service instances is abnormal for five consecutive times within 4 minutes, 30% of instances will be isolated for 10 minutes. After the first isolation period expires, abnormal instances will receive traffic again. If these instances still cannot work normally, they will be isolated for 20 minutes for the second time. The other isolation periods follow the same rule. You can update the parameter values as required.

  1. Log in to the UCS console. In the navigation pane, choose Service Meshes.
  2. Click the name of the target service mesh to go to its details page.
  3. In the navigation pane, choose Traffic Governance > Traffic Policy.
  4. Locate the traffic policy to be updated and click Edit YAML in the Operation column.

    The following are the parameters in the YAML file. (Configure the parameters based on site requirements.)

    apiVersion: networking.istio.io/v1beta1
    kind: DestinationRule
    metadata:
      name: forecast
      namespace: weather
    spec:
      host: forecast
      trafficPolicy:
        connectionPool:
          tcp:
            maxConnections: 80
            connectTimeout: 25ms
          http:
            http2MaxRequests: 800
            maxRequestsPerConnection: 10
        outlierDetection:
          consecutive5xxErrors: 5
          interval: 4m
          baseEjectionTime: 10m
          maxEjectionPercent: 30