Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Using Dark Launch

Updated on 2024-05-06 GMT+08:00

In dark launch, a small number of users test the trial version, ensuring the smooth rollout of new features. Once new features become mature, a formal version is released for all users. Dark launch ensures stability of the entire system. During initial dark launch, problems can be detected and fixed.

For ServiceComb Java chassis and Spring Cloud Huawei microservices registered with the microservice engines, deliver configurations to use dark launch.

If ServiceComb Java chassis depends on handler-router and Spring Cloud Huawei depends on spring-cloud-starter-huawei-router to implement microservice dark launch, the delivery rules comply with the following specifications:

servicecomb:
    routeRule:  
      provider: | #Service name.
      - precedence: 2 #Priority.
          match:        #Matching policy.
            headers:          #Header matching.
              region:            
                exact: 'providerRegion'

              type:         
                exact: gray
           route: #Routing rule.
            - weight: 100 #Weight value.
              tags:
                version: 1.0.0
              
        - precedence: 1
          route:
            - weight: 20
              tags:
                version: 0.0.1
                canaryProperty: group-a
            - weight: 80
              tags:
                version: 0.0.2

The preceding configurations are described as follows:

  • match specifies the requests to be matched. The matching condition is headers. Fields in headers support exact match. If match is not defined, any request can be matched.
  • The forwarding weight is defined in routeRule.{targetServiceName}.route and is configured by weight. The value of weight indicates the percentage. The sum of the values must be equal to 100. If the sum is smaller than 100, the value in the latest version is calculated.
  • The service group is defined under routeRule.{targetServiceName}.route and is configured by tags. version is a special tag, indicating the microservice version. You can also configure other properties, which are defined in the properties of the instance.
  • A larger priority value indicates a higher priority.

If ServiceComb Java chassis depends on darklaunch to implement microservice dark launch, the rules are also delivered on the microservice engine page and comply with the following specifications:

{
  "policyType":"RULE",
  "ruleItems":[
    {
      "groupName":"self_rule_test",
      "groupCondition":"version=0.0.1",
      "policyCondition":"name=11111",
      "versions":["0.0.1"]
     }],
   "empty":false
}

The preceding configurations are described as follows:

  • policyCondition: matching condition of the routing rule. This rule matches the request parameter name. When the value is 11111, the current routing rule is matched.
  • groupName: name of the routing rule.
  • groupCondition: target group of the rule. When name=11111 is matched, the route is routed to the microservice instance with version=0.0.1.
  • The configuration item is fixed to cse.darklaunch.policy.${serviceName}.

Spring Cloud Huawei

When Spring Cloud Huawei uses the dark launch, you need to add the following dependencies to the project. If the dependencies have been directly or indirectly included in the project, you do not need to add them.

<dependency>
  <groupId>com.huaweicloud</groupId>
  <artifactId>spring-cloud-starter-huawei-router</artifactId>
</dependency>

Set the headers parameter on which the dark launch rule depends.

  • In 1.10.7 and later versions, set the header parameter in the configuration file. The header in the user request is not transparently transmitted to the downstream service.
    spring:
      cloud:
        servicecomb:
          context:
            headerContextMapper:
              canary: canary
  • In versions earlier than 1.10.7, the header parameters set in the request are transparently transmitted.

Java Chassis

When Java chassis uses dark launch, you need to add the following dependencies to the project. If the dependencies have been directly or indirectly included in the project, you do not need to add them.

<dependency>
  <groupId>org.apache.servicecomb</groupId>
  <artifactId>handler-router</artifactId>
</dependency>

or

<dependency>
    <groupId>org.apache.servicecomb</groupId>
    <artifactId>darklaunch</artifactId>
</dependency>

Add the following configuration item to the configuration file:

servicecomb.router.type: router

By default, Java chassis does not transfer non-parameter headers to microservices. If dark launch depends on non-parameter headers, you can add the following configuration items:

servicecomb.router.header: canaryHeader1,canaryHeader2

Java chassis uses these non-parameter headers for dark launch matching.

If the request is forwarded by EdgeService, you also need to add configurations related to dark launch to EdgeService.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback