You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by gy...@gmail.com, gy...@gmail.com on 2020/10/19 11:05:45 UTC

[DISCUSSION] Feature : service governance based traffic marker


[discuss] Feature : service governance based traffic marker

Posted by YL G <gy...@gmail.com>.
Hi, All:


1. Background
In a real scenario, there are hybrid service of different microservice
frameworks. For example, Users who using Apache Dubbo 、Spring Cloud and
Servicecomb hope can work together under a unified registry and
configuration center.
We developed [spring cloud Huawei](
https://github.com/huaweicloud/spring-cloud-huawei )、[dubbo-servicecomb](
https://github.com/huaweicloud/dubbo-servicecomb )so that service developed
with spring cloud and Dubbo can use servicecomb-servercenter and
servicecomb-kie for unified management.
We expect that any framework (Dubbo, spring cloud) registered with the same
servicecomb-servercenter and servicecomb-kie can have similar behavior. For
service governance, we also need to provide a unified spec for management.
We define a set of standards and standardize the definition of governance
rules. For example:

servicecomb:
  match:
   traffic-to-some-api-from-jack: |
     matches:
       - apiPath:
           exact: "/hello"
         method:
           - GET
           - POST
         trafficMarkPolicy: once
  rateLimiting:
   limiterPolicy1: |
     match: traffic-to-some-api-from-jack
     timeoutDuration: 25
     limitRefreshPeriod: 1000
     limitForPeriod: 1Explanation:

A HTTP request is marked by HTTP method, HTTP URI and HTTP header. For a
request, we can do governance like ratelimit , circuitbreaker, bulkhead,
retry through the configuration.
2. Implementation
Spring Cloud Huawei has been implemented based on spec , consider adding
this feature in Java chassis.
Define a set of interfaces and specs called service comb runtime interface
(SCRI). SCRI based on netfilx archhaius , make it easy to obtain governance
policies and expand .
3. Value
Spring Cloud, Dubbo and Servicecomb provide users with a unified experience.
Expand the influence of servicecomb-servercenter and servicecomb-kie in
other popular frameworks such as Spring Cloud and Dubbo.


GuoYL