Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the best way to access WPA controllers? #132

Open
KangBK0120 opened this issue Jun 1, 2021 · 6 comments
Open

What is the best way to access WPA controllers? #132

KangBK0120 opened this issue Jun 1, 2021 · 6 comments
Labels
question Further information is requested

Comments

@KangBK0120
Copy link

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?

@alok87
Copy link
Contributor

alok87 commented Jun 2, 2021

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 alok87 added the question Further information is requested label Jun 2, 2021
@KangBK0120
Copy link
Author

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.

@alok87
Copy link
Contributor

alok87 commented Jun 2, 2021

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.

@KangBK0120
Copy link
Author

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?

@alok87
Copy link
Contributor

alok87 commented Jun 2, 2021

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
Copy link
Contributor

alok87 commented Jun 2, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants