karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.12k stars 807 forks source link

feat: Add QPS related parameters to control the request rate of metrics-adapter to member clusters. #4809

Closed chaunceyjiang closed 2 weeks ago

chaunceyjiang commented 3 weeks ago

What type of PR is this? /kind bug

What this PR does / why we need it:

Add QPS related parameters to control the request rate of metrics-adapter to member clusters.

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

karmada-metrics-adapter: Add QPS related parameters to control the request rate of metrics-adapter to member clusters.
chaunceyjiang commented 3 weeks ago

/cc @chaosi-zju PTAL.

chaosi-zju commented 3 weeks ago

we can update the release note

chaosi-zju commented 3 weeks ago

As a client, adapter has a Burst/QPS limit by default, and when the request volume is too large, it will wait for a long time.

However, when the adapter receives too many upstream (karmada-apiserver) requests and its own downstream (member cluster apiserver) requests are restricted, it will cause a backlog of requests, which in turn causes adapter memory to continue to rise.

Therefore, by setting a reasonable Burst/QPS parameter, memory rise problem can be avoided.

/LGTM

chaunceyjiang commented 3 weeks ago

/kind feature

chaunceyjiang commented 3 weeks ago

/kind-remove bug

karmada-bot commented 2 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[cmd/OWNERS](https://github.com/karmada-io/karmada/blob/master/cmd/OWNERS)~~ [RainbowMango] - ~~[pkg/metricsadapter/OWNERS](https://github.com/karmada-io/karmada/blob/master/pkg/metricsadapter/OWNERS)~~ [RainbowMango] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment