Sentinel icon indicating copy to clipboard operation
Sentinel copied to clipboard

[Feature] Add data-source extension for OpenSergo rate limiting and fault-tolerance spec

Open sczyh30 opened this issue 2 years ago • 4 comments

Issue Description

Type: feature request

Describe what happened (or what feature you want)

OpenSergo is a universal microservice governance specification, which covers fundamental scenarios like traffic routing, rate limiting and fault-tolerance.

Sentinel 2.0 will be the standard implementation of OpenSergo traffic governance spec (including traffic routing, rate limiting and fault-tolerance). Since Sentinel has already provided capabilities of rate limiting and microservice fault-tolerance, we could just add a data-source extension, which subscribes rules from the OpenSergo Control Plane, convert the rules to Sentinel rules, then developers could register the data-source to rule managers of Sentinel.

Anything else we need to know?

  • OpenSergo fault-tolerance v1alpha1 spec: https://github.com/opensergo/opensergo-specification/blob/main/specification/zh-Hans/fault-tolerance.md
  • Structure of OpenSergo operator and SDK: https://github.com/opensergo/opensergo-specification/issues/17
  • OpenSergo Java SDK: https://github.com/opensergo/opensergo-java-sdk

sczyh30 avatar Aug 23 '22 09:08 sczyh30

For discussion of the spec: https://github.com/alibaba/Sentinel/issues/2759

sczyh30 avatar Aug 23 '22 09:08 sczyh30

A basic design and workflow of the OpenSergo data-source group:

image

sczyh30 avatar Aug 23 '22 09:08 sczyh30

规范定位文档中,关于容错治理规则的定义:

apiVersion: fault-tolerance.opensergo.io/v1alpha1
kind: FaultToleranceRule
metadata:
  name: my-rule
  namespace: prod
  labels:
    app: my-app # 规则配置生效的应用名
spec:
  targets:
    - targetResourceName: '/foo'
  strategies: 
    - name: rate-limit-foo
  fallbackAction: fallback-foo

{.metadata.labels}是设置当前容错治理规则配置生效的应用名? 这是否应该放到{.spec.selector}中会更好一些?保持和其他CRD语义一致?(例如KubernetesIstio中对CRD的定义)。例如这个例子

metadata设置的信息应当是当前CR的元数据信息。

YunWZ avatar Aug 24 '22 07:08 YunWZ

@YunWZ 很好的建议,可以 comment 到这里哈:https://github.com/opensergo/opensergo-specification/issues/8

sczyh30 avatar Aug 24 '22 07:08 sczyh30