sablierapp / sablier

Start your containers on demand, shut them down automatically when there's no activity. Docker, Docker Swarm Mode and Kubernetes compatible.
https://sablierapp.dev/
GNU Affero General Public License v3.0
1.36k stars 46 forks source link

fix(providers/kubernetes): Added QPS and Burst tweaks for client-side throttling #179

Closed valexz closed 1 year ago

valexz commented 1 year ago

Hello

The reasoning behind this PR is to enable the adjustment of QPS and Burst configuration parameters in the client-go library.

This will help avoid constant throttling issues when dealing with over 100 K8S deployments. The default values are insufficient for such a large number of deployments.

How client-side throttling works: // NewTokenBucketRateLimiter creates a rate limiter which implements a token bucket approach. // The rate limiter allows bursts of up to 'burst' to exceed the QPS, while still maintaining a // smoothed qps rate of 'qps'. // The bucket is initially filled with 'burst' tokens, and refills at a rate of 'qps'. // The maximum number of tokens in the bucket is capped at 'burst'.

It is a new PR with clearer diff with beta branch, instead of broken #178 I hope that working with that Pull Request will be more convenient

acouvreur commented 1 year ago

Thanks a lot @valexz Really appreciate it

acouvreur commented 1 year ago

Because you changed the configuration, you will need to update the tests accordingly

Take a look at the config tests please, so we make sure we can load the new configuration through config file, cli arguments and env var

acouvreur commented 1 year ago

:tada: This PR is included in version 1.4.1-beta.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

acouvreur commented 8 months ago

:tada: This PR is included in version 1.6.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: