Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.

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

Service Scenario Governance

Updated on 2024-10-15 GMT+08:00

ServiceComb engines provide unified traffic feature governance based on dynamic configurations for different microservice development frameworks, such as Spring Cloud and Java chassis. You can use the microservice governance function of CSE by introducing related governance components to the development frameworks.

ServiceComb engine governance consists of two steps: creating a service scenario and creating a governance policy. The two steps can be performed before microservice deployment for independent governance planning.

NOTE:
  • This section applies to ServiceComb engine 2.x.
  • If the ServiceComb engine version is 2.0.0 or later but earlier than 2.4.0, the name of this section is "Microservice Governance".

Prerequisites

  • You need to understand the API design of the microservice to be governed and create service scenarios based on the API features.
  • You need to enable the dynamic configuration-based traffic feature governance function for the development framework of the microservice to be governed. If the function is not enabled, the microservice governance function can still be used, but the governance has no effects.

Governance Policies

You can configure the following policies: Rate Limiting, Circuit Breaker, Retry, and Bulkhead. For details, see the following table.

Policy

Description

Rate Limiting

In the case of a traffic storm or predictable traffic spikes, rate limiting is performed on non-key service scenarios to prevent service and data breakdown caused by instantaneous heavy traffic.

Retry

When a service encounters a non-fatal error (such as occasional timeout), retries can be performed to prevent service failures.

Bulkhead

In the case of a large-scale concurrent traffic storm or predictable traffic impact, the concurrent traffic is controlled to prevent service and data breakdown caused by instantaneously large concurrent traffic.

Circuit Breaker

When the error rate of a service scenario exceeds the threshold, all requests in the service scenario will be rejected within one minute to ensure the availability of the entire service system. Then 50% of the service requests will be accepted and statistics on the service error rate will be collected until the error rate in the service scenario is reduced to a value lower than the threshold.

Creating a Service Scenario

NOTE:

When a service scenario is created, the configuration starting with servicecomb.matchgroup. is automatically generated.

  1. Log in to CSE.
  2. Choose Exclusive ServiceComb Engines.
  3. Click the target engine.
  4. Choose Service Scenario Governance.

    NOTE:

    If the ServiceComb engine version is 2.0.0 or later but earlier than 2.4.0, choose Microservice Governance.

    • For ServiceComb engines with security authentication disabled, go to 6.
    • For ServiceComb engines with security authentication enabled, go to 5.

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

    NOTE:

  6. Choose Service Scenarios > Create Service Scenario and set parameters by referring to the following table.

    Parameter

    Description

    Scenario

    Enter the service scenario name.

    Environment

    Select a microservice environment.

    Application

    Select the application to which the service scenario to be created belongs.

    Matching Rule

    Click Add Matching Rule to set the request marker.

    • Method: Select the method of marking the traffic request feature. The GET, PUT, POST, DELETE, and PATCH methods are supported.
    • Path: Set features contained in the traffic request URI.
    • Headers: Click Add Headers Rule and set the marker of the traffic request header.
    NOTE:
    • Method and Path are mandatory.
    • Headers is optional.

  7. Click OK.

    NOTE:
    • Click in the row that contains a service scenario to view the matching rule details.
    • Click Edit in the Operation column of a service scenario to edit the service scenario.
    • Click Delete in the Operation column of a service scenario to delete the service scenario.

Creating a Governance Policy

  1. Log in to CSE.
  2. Choose Exclusive ServiceComb Engines.
  3. Click the target engine.
  4. Choose Service Scenario Governance.

    NOTE:

    If the ServiceComb engine version is 2.0.0 or later but earlier than 2.4.0, choose Microservice Governance.

    • For ServiceComb engines with security authentication disabled, go to 6.
    • For ServiceComb engines with security authentication enabled, go to 5.

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

    NOTE:

  6. Go to the Governance Policy page and click Create Governance Policy.
  7. Select a governance mode, click Create Policy, and set parameters.

    • Rate Limiting

      Parameter

      Description

      Policy

      Enter the name of the governance policy.

      Service Scenarios

      Set the service scenarios to which the governance policy applies.

      • Click Select Service Scenario and select the created service scenario.
      • Click Create Service Scenario to create a service scenario.

      Requests per Unit

      Set the number of requests and time segment.

      When the number of requests sent by the rate limiting object to the current service instance within the specified period exceeds the specified value, the excess requests are limited and error code 429 is returned.

    • Retry

      Parameter

      Description

      Policy

      Enter the name of the governance policy.

      Service Scenarios

      Set the service scenarios to which the governance policy applies.

      • Click Select Service Scenario and select the created service scenario.
      • Click Create Service Scenario to create a service scenario.

      Response Error Code

      Enter response error codes to define the error types that trigger retries.

      Retry Attempts

      Set the number of retries.

      Retry Interval

      Select a retry policy.

      • Fixed: The retry interval is fixed.
      • Exponential: Each interval is selected by the exponential backoff algorithm.

      Interval Duration

      Set the retry interval duration.

      • If Retry Interval is set to Fixed, set the fixed interval.
      • If Retry Interval is set to Exponential, set the retry benchmark time and unit (s/ms).
    • Bulkhead

      Parameter

      Description

      Policy

      Enter the name of the governance policy.

      Service Scenarios

      Set the service scenarios to which the governance policy applies.

      • Click Select Service Scenario and select the created service scenario.
      • Click Create Service Scenario to create a service scenario.

      Max. Concurrency

      Set the maximum number of concurrent requests based on the actual service processing capability of the system.

      Block Duration

      Set the block duration and unit (s/ms).

      When the number of concurrent requests exceeds the maximum, the requests are discarded after the blocking duration.

    • Circuit Breaker

      Parameter

      Description

      Policy

      Enter the name of the governance policy.

      Service Scenarios

      Set the service scenarios to which the governance policy applies.

      • Click Select Service Scenario and select the created service scenario.
      • Click Create Service Scenario to create a service scenario.

      Coverage

      Sliding Window Type

      Select a sliding window type.

      • Time: time window
      • Requests: request window

      Sliding Window Size

      Set the size of the sliding window.

      • If Sliding Window Type is set to Time, the calls in the last n seconds or minutes are recorded and collected.
      • If Sliding Window Type is set to Requests, the latest n calls are recorded and collected.

      n is the size of the sliding window.

      Calls Baseline

      Set the baseline of the number of calls, that is, the minimum number of calls required for collecting statistics on the call error rate.

      For example, if Calls Baseline is set to 10, at least 10 call must be recorded to collect statistics on the error rate.

      Triggers

      Error Threshold

      Percentage of call errors. This parameter is valid when Set circuit breaker to trigger at an error threshold is selected.

      When the call error rate is greater than or equal to the error threshold, circuit breaker occurs and response code 429 is returned.

      Slow Request Ratio

      This parameter is valid when Set circuit breaker to trigger at a specific request speed and ratio is selected. Set the following parameters:

      • Slow Speed: defines the slow request threshold. If the response time of a request exceeds the threshold, the request is a slow request.
      • Slow Threshold: When the specified slow request ratio is reached, circuit breaker occurs and response code 429 is returned.

  8. Click Create to make the governance policy take effect.

    NOTE:

    In the governance policy list, click in the row where the service scenario is located:

    • Click Enable in the Operation column of a governance policy to enable the policy.
    • Click Disable in the Operation column of a governance policy to disable the policy.
    • Click Edit in the Operation column of a governance policy to edit the policy.
    • Click Delete in the Operation column of a governance policy to delete the policy.

Sitemizi ve deneyiminizi iyileştirmek için çerezleri kullanırız. Sitemizde tarama yapmaya devam ederek çerez politikamızı kabul etmiş olursunuz. Daha fazla bilgi edinin

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback