kitex-contrib / xds

xDS support for Kitex and enables Kitex to perform in Proxyless mode with Istio.
Apache License 2.0
33 stars 3 forks source link

Feature: support limit on kitex proxyless server #28

Closed whalecold closed 5 months ago

whalecold commented 8 months ago

Is your feature request related to a problem? Please describe.

Kitex 当前支持限流策略策略。Istio 的治理策略还不支持,envoy proxy 支持本地限流策略,可以通过 envoyfilter cr 进行 patch。

Describe the solution you'd like

{
  "stat_prefix": ...,
  "status": {...},
  "token_bucket": {...},
  "filter_enabled": {...},
  "filter_enforced": {...},
  "request_headers_to_add_when_not_enforced": [],
  "response_headers_to_add": [],
  "descriptors": [],
  "stage": ...,
  "local_rate_limit_per_downstream_connection": ...,
  "enable_x_ratelimit_headers": ...,
  "vh_rate_limits": ...,
  "always_consume_default_token_bucket": {...},
  "rate_limited_as_resource_exhausted": ...
}

{
  "max_tokens": ...,
  "tokens_per_fill": {...},
  "fill_interval": {...}
}

使用 xDS 中的 token_bucket.max_tokens 对其 kitex 限流器中的 MaxQPS.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

参考文档:

ppzqh commented 8 months ago

Thanks for the issue and contribution. Will review the pr.

whalecold commented 5 months ago

/close

bytedance-oss-robot[bot] commented 5 months ago

@whalecold: Closing this issue.

In response to [this](https://github.com/kitex-contrib/xds/issues/28#issuecomment-2134903241): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.