Updated on 2025-08-29 GMT+08:00

Microservice Management

On the Microservice List tab, you can create, view, delete, dynamically configure, and dark launch microservices, and clean microservices without instances.

Creating a Microservice

Create a microservice for testing or restoring the microservice that is deleted by mistake. If a microservice that is automatically registered with ServiceComb is deleted by mistake, you can manually create a microservice to restore the deleted microservice. The microservice name, application, version, and environment must be the same as those of the original microservice.

  1. Click the target engine.
  2. Choose Microservice Catalog.

    • For engines with security authentication disabled, go to 4.
    • For engines with security authentication enabled, if the login VDC user is the user imported in Importing an IAM Account, go to 4. For other users, go to 3.

  3. In the displayed Security Authentication dialog box, enter the account name and password, and click OK.

  1. Choose Microservice List > Create a Microservice and set microservice parameters by referring to the following table. Parameters marked with an asterisk (*) are mandatory.

    Parameter

    Description

    *Microservice

    Microservice name, for example, myServiceName. Enter 1 to 128 characters. Start and end with a digit or letter. Only use digits, letters, and special characters (_-.). The special characters cannot be used consecutively.

    *Application

    Name of the application to which the microservice belongs. Microservices are isolated by applications. Enter 1 to 160 characters. Start and end with a digit or letter. Only use digits, letters, and special characters (_-.). The special characters cannot be used consecutively.

    *Version

    Microservice version. The default value is 1.0.0.

    The microservice version is in the format of X.Y.Z or X.Y.Z.B, where X, Y, Z, and B are digits and range from 0 to 32767. The value contains 3 to 46 characters.

    *Environment

    Environment where the microservice is located to isolate microservice data, including the version and instance.

    Description

    Microservice description.

  2. Click OK.

    Once the microservice is created, it will be displayed in Microservice List.

Viewing the Microservice List

The microservice list displays all microservices of the current ServiceComb engine. You can search for the target microservice by microservice name, or filter microservices by environment and application.

  1. Click the target engine.
  2. Choose Microservice Catalog.

    • For engines with security authentication disabled, go to 4.
    • For engines with security authentication enabled, if the login VDC user is the user imported in Importing an IAM Account, go to 4. For other users, go to 3.

  3. In the displayed Security Authentication dialog box, enter the account name and password, and click OK.

  4. Click Microservice List to view all microservices of the current account under the engine.

    You can search for the target microservice by microservice name, or filter microservices by environment and application.

Viewing Microservice Details

On the microservice details page, you can view the instance list, called services, calling services, dynamic configuration, and service contract. You can also perform Dynamic Configuration and Dark Launch on microservice-level configurations.

  1. Click the target engine.
  2. Choose Microservice Catalog.

    • For engines with security authentication disabled, go to 4.
    • For engines with security authentication enabled, if the login VDC user is the user imported in Importing an IAM Account, go to 4. For other users, go to 3.

  3. In the displayed Security Authentication dialog box, enter the account name and password, and click OK.

  4. Click the microservice to be viewed in Microservice List. On the displayed page, view the instance list, called services, calling services, dynamic configuration, dark launch, and service contract.

Cleaning Versions Without Instances

Delete microservice versions with no running instances to optimize resource utilization, improve governance efficiency, and ensure system stability.

  1. Click the target engine.
  2. Choose Microservice Catalog.

    • For engines with security authentication disabled, go to 4.
    • For engines with security authentication enabled, if the login VDC user is the user imported in Importing an IAM Account, go to 4. For other users, go to 3.

  3. In the displayed Security Authentication dialog box, enter the account name and password, and click OK.

  4. Choose Microservice List > Clean No Instance Services. Select the microservice version without instances to be cleaned.

    You can search for the target microservice by microservice name, or filter microservices by environment and application.

  5. Click OK.

Dynamic Configuration

Create, edit, disable, and delete microservice-level configurations, and view historical versions of microservice-level configurations.

Configuration items are stored in plaintext. Do not include sensitive data.

  1. Click the target engine.
  2. Choose Microservice Catalog.

    • For engines with security authentication disabled, go to 4.
    • For engines with security authentication enabled, if the login VDC user is the user imported in Importing an IAM Account, go to 4. For other users, go to 3.

  3. In the displayed Security Authentication dialog box, enter the account name and password, and click OK.

  4. Click Microservice List and click a microservice.
  5. Choose Dynamic Configuration. On the Dynamic Configuration tab, perform the following operations.

    Operation

    Procedure

    Create a configuration item

    See Creating a Configuration for ServiceComb Engine 2.x. Microservice-level is selected for Configuration Range and Microservices is set to the current microservice.

    View historical versions

    Click View Historical Version in the Operation column of the target configuration item.

    Disable a configuration item

    1. In the Operation column of the target configuration item, choose More > Disable.
    2. Click OK.

    Modify a configuration item

    1. Click Edit in the Operation column corresponding to the target configuration item.
    2. On the configuration details page, click Edit.
    3. On the Configuration Details tab, enter the new configuration.
    4. Click Save.

    Delete a configuration item

    1. In the Operation column of the target configuration item, choose More > Delete.
    2. Click OK.

Dark Launch

In dark launch, new features are tested in a selected group of users. When the features become mature and stable, they are released to all users. This ensures the smooth feature rollout.

  • For microservices developed based on the ServiceComb Java Chassis framework, add dependency darklaunch or handler-router to POM and add servicecomb.router.type=router to the microservice.yaml configuration file.
  • For microservices developed based on the Spring Cloud Huawei framework, add dependency spring-cloud-starter-huawei-router to POM.
  1. Click the target engine.
  1. Choose Microservice Catalog.

    • For engines with security authentication disabled, go to 4.
    • For engines with security authentication enabled, if the login VDC user is the user imported in Importing an IAM Account, go to 4. For other users, go to 3.

  2. In the displayed Security Authentication dialog box, enter the account name and password, and click OK.

  3. In the microservice list, click a microservice. On the displayed page, choose Dark Launch.
  4. Click Add Launch Rule.

    • To add a launch rule by Weight:
      1. Click Weight.
      2. Set the following parameters.

        Parameter

        Description

        Rule Name

        Name of the rule. Enter 3 to 24 characters. Start with a letter. Only use digits, letters, and special characters (.@_-).

        Scope

        • Microservice version to which the rule applies.
        • Select Do you want to add a customized version? and add a new version as prompted.

        Rule Configuration

        Traffic allocation rate for the selected version. Traffic is evenly allocated to the selected service versions based on the configured value.

      3. Click OK to complete the weight rule configuration and dark launch.
    • To add a launch rule by Customization:
      1. Click Custom.
      2. Set the following parameters.

        Parameter

        Description

        Rule Name

        Name of the rule. Enter 3 to 24 characters. Start with a letter. Only use digits, letters, and special characters (.@_-).

        Scope

        • Microservice version to which the rule applies.
        • Select Do you want to add a customized version? and add a new version as prompted.

        Rule Configuration

        Configure the matching rule. When darklaunch is used to implement dark launch, this parameter configures policyCondition.

        When handler-router is used to implement dark launch, this parameter configures Headers.

        • Parameter Name

          Set this parameter based on the parameter name of contract or the customized key of the header.

        • Rules
          By selecting the matching character and the value corresponding to the key of contract or the key of the header, requests that meet the rules are allocated to the microservice version.
          NOTE:
          • If ~ is selected from the drop-down list next to Rules, the asterisk (*) and question mark (?) in the Rules value can be used for fuzzy matching. The asterisk (*) indicates a character of any length, and the question mark (?) indicates one character. For example, if the rule value of Name is set to *1000, all Name fields ending with 1000 can be matched.
          • If ~ is not selected from the drop-down list next to Rules, the asterisk (*) and question mark (?) in the Rules value cannot be used for fuzzy matching.

      3. Click OK to complete the customization rule configuration and dark launch.

Examples of delivering dark launch rules:

  • For microservices developed based on the ServiceComb Java Chassis framework, rules are delivered based on dependency darklaunch on the ServiceComb engine page. You can add dark launch rules in customized mode.

    This key must exist in the contract. It is possible that the server API is String paramA, but paramB is actually generated after the annotation is added. Therefore, paramB should be set here.

    By selecting the matching character and the value corresponding to the key of contract, requests that meet the rules are allocated to the microservice version.

    A delivered rule is as follows. The configuration item is cse.darklaunch.policy.${serviceName}.

  • For microservices developed based on the ServiceComb Java Chassis framework, dark launch rules that depend on handler-router need to be manually delivered in the configuration center. The configuration item is servicecomb.routeRule.${serviceName}. The content is as follows:

  • For microservices developed based on the Spring Cloud Huawei framework, dark launch rules delivered on the ServiceComb engine page are as follows:

Deleting a Microservice

Delete a microservice that is no longer used.

  • After a microservice is deleted, you can restore it by referring to Restoring Backup Data.
  • If the service to be deleted has instances, delete the instances first. Otherwise, the service will be registered again.
  1. Click the target engine.
  2. Choose Microservice Catalog.

    • For engines with security authentication disabled, go to 4.
    • For engines with security authentication enabled, if the login VDC user is the user imported in Importing an IAM Account, go to 4. For other users, go to 3.

  3. In the displayed Security Authentication dialog box, enter the account name and password, and click OK.

  4. Click Microservice List.

    • To delete microservices in batches, select the microservices to be deleted and click Delete above the microservices.
    • To delete one microservice, locate the row that contains the microservice to be deleted and click Delete in the Operation column.

  5. In the displayed dialog box, enter DELETE to confirm the deletion and click OK.