Updated on 2024-09-27 GMT+08:00

Modifying a Component Dark Launch Policy

If the component is upgraded through dark launch, you can modify the dark launch policy after the first batch of dark launch is complete.

Prerequisites

  • The component has been upgraded through dark launch. For details, see Upgrading a Component in Dark Launch Mode.
  • The component is in the Releasing state. For details about how to check the component status, see Viewing Component Details.
  • For a dark launch component, the ServiceComb engine instances bound to this component cannot be deleted. Otherwise, the operation fails. For an ELB dark launch component, the ELB instances bound to this component cannot be deleted. Otherwise, the operation fails. For details about dark launch types, see Introduction to Dark Launch.

Modifying a Component Dark Launch Policy

  1. Log in to ServiceStage.
  2. Use either of the following methods to go to the Deployment Records page.

    • On the Application Management page, click the application to which the component belongs, and click the target component in Component List. In the left navigation pane, choose Deployment Records.
    • On the Component Management page, click the target component. In the left navigation pane, choose Deployment Records.

  3. In the Deployment Records list, select the target deployment record of the Dark Launch type.
  4. Click Modify Dark Launch Policy and modify the dark launch configuration by referring to the following table.

    Parameter

    Description

    Dark Launch Policy

    Select a dark lunch policy.

    • Traffic ratio-based: Flexibly and dynamically adjust the traffic ratio of different versions.
    • Content-based: Control the version to which the request is sent according to the request.
      NOTE:

      ELB dark launch supports only the Traffic ratio-based policies.

    Traffic Ratio

    When Dark Launch Policy is set to Traffic ratio-based, set the traffic ratio.

    • Traffic Ratio: percentage of traffic directed to the new version.
    • Current Traffic Ratio: percentage of traffic directed to the current version.

    *Takes effect

    When Dark Launch Policy is set to Content-based, set the effective mode of the dark launch policy.

    • With single criterion: The dark launch policy takes effect when any matching rule is met.
    • With full criteria: The dark launch policy takes effect when all matching rules are met.
    NOTE:

    For ELB dark launch, only With full criteria is supported.

    *Matching Rule

    When Dark Launch Policy is set to Content-based, set the matching rule for the dark launch policy to take effect.

    1. Click Add Matching Condition.
    2. Set Matching Type. Currently, only Request header is supported.
    3. Set Parameter Name, that is, the key corresponding to Matching Type.
    4. Set Condition Type, that is, the matching rule that Condition Value meets.
      • Equal: The value corresponding to Matching Type is equal to the configured Condition Value.
      • Matching: Condition Value supports PERL-compatible regular expressions. It is supported by only microservice dark launch.
      • Enumerated: Multiple Condition Value are separated by commas (,).
    5. Set Condition Value, that is, the value corresponding to Matching Type.

    *First Batch of Dark Launch Instances

    Set this parameter when Instances Deployed for Dark Launch is set to Canary (increase, then decrease) or Canary (decrease, then increase).

    The value range is [1, Total number of instances – 1]. Total number of instances refers to the number of running instances of the component.

    For example, if there are 6 component instances and First Batch of Dark Launch Instances is set to 1, 1 instance will be upgraded in the first batch.

    *Deployment Batch with Remaining Instances

    Set this parameter when Instances Deployed for Dark Launch is set to Canary (increase, then decrease) or Canary (decrease, then increase). That is, the number of batches whose remaining instances will be upgraded.

    For example, if there are 6 component instances, First Batch of Dark Launch Instances is set to 1, and Deployment Batch with Remaining Instances is set to 3, there are 5 instances remaining to be deployed in 3 batches, and these 5 instances will be upgraded in the sequence 2:2:1

  5. Click Modify Dark Launch Policy and wait until the dark launch is complete.