k8s-worker-pod-autoscaler icon indicating copy to clipboard operation
k8s-worker-pod-autoscaler copied to clipboard

What is the best way to access WPA controllers?

Open KangBK0120 opened this issue 3 years ago • 6 comments

Hi, thanks for publishing this project. it's very useful.

I found that I can edit the deployment "workerpodautoscaler" in kube-system namespace. Is it okay to edit the deployment directly? Or is there a better way to tune the flags in the controller?

And is there no way to use different flags(different long and short poll interval, etc.) for each WPA?

KangBK0120 avatar Jun 01 '21 12:06 KangBK0120

Hey, thanks! we are very happy you find it useful!

  1. Yes, it is totally fine to make changes in the workerpodautoscaler deployment to make changes. kubectl edit deployment workerpodautoscaler -n kube-system. This is the only way at present.
  2. Long poll and short poll interval are central configuration for all WPA resources which in our experience works. We been using the default configuration for 1000s+ of workers/queues. Defaults are good, why do you wish to configure it per resource?

alok87 avatar Jun 02 '21 04:06 alok87

Thanks for the reply.

In my environment, after I send a message to an SQS queue with python boto3, it takes around 20~30 seconds for the WPA controller to detect the queue and autoscale a deployment. I want to make it faster with shorter poll intervals and resync time.

KangBK0120 avatar Jun 02 '21 06:06 KangBK0120

Do you wish to configure it per resource, the central config does not work out for you? I am forgetting but is the SQS data available in less than 20 seconds?

Also making cloudwatch calls can get expensive if done very frequently.

alok87 avatar Jun 02 '21 13:06 alok87

Sorry for the confusion. I use the central config for now.

As far as I tried, the message is available in less than 20 seconds.
Do you and your company use a default value(poll interval, ...) for the controller without any tuning?

KangBK0120 avatar Jun 02 '21 13:06 KangBK0120

Yes using the default, if you don't specify any value for the short poll interval, it takes the default as 20. The document in README shows default for all flags.

alok87 avatar Jun 02 '21 15:06 alok87

Also the values AWS shows in the messages and not visible are approximate values. Hence their metric is called approximate Messages Visible.

alok87 avatar Jun 02 '21 15:06 alok87