-
Notifications
You must be signed in to change notification settings - Fork 47
Strange HPA behaviour with custom insights metric (pods don't scale down) #34
Comments
There don't appear to be any current scaling events. A few questions:
|
Well is was ust trying to understand it. but it just wants to scale up.. there seems to be something wrong with the replica calculation or something.. Is there anywhere i can check some debugging on this? I am running v1.10.7 with azure aks
|
Could you share your HPA and the deployment you are trying to scale? The two examples you shared are different from each other and it is difficult to see a pattern. Are you using a custom metric in App Insights or a built-in Metric? Looking at the first example there could be a miss-match between the quantities types that are being compared. See this info on metric quantities from the kubernetes docs. If you are using a custom metric that you are reporting could you give some details on the what it is and value that is being reported to AI? This will help replicate the issue. There are a couple ways to debug:
|
I am using a custom metric, that is provided by my application (customMetric/requestspersecond). hpa
deployment:
api results
raw result:
describe HPA (scaling up??)
|
Thanks for the detail. I am going to attempt to recreate. Looks like you are using the helm wordpress deployment: https://hub.kubeapps.com/charts/stable/wordpress? |
Yes its just the helm install of wordpress. I have used the insights plugin to be able to send metrics and created a function to send the requests per second value of apaches mod_status module every time the wp_login.php is requested. This is done by the readinessprobe every minute. If you need the code snippets let me know. Of you can of course just send a number to simulate it.. |
meanwhile i have set it up with the prometheus custom metrics adapter. There is some difference in the output from the raw get request:
here you see the "name" element has the pods name. Maybe the calculation is going wrong because the adpater doesnt give per pod metrics but just one. |
Sorry for the delay here, was traveling last week. We were able to reproduce similar behavior but haven't identified the root cause. |
Quick update: Have identified the issue and have a fix that I am testing. |
Hey! Thanks for the update! |
That's awesome to see this thread. I experience a similar issue with custom metric scale down. Thanks |
It should be resolved in the latest version. Are you still experiencing it? |
Ah... Sorry my bad, I confused this project with the prometheus-adapter. |
I am using v0.4.1 of custom metric adapter and the HPA is acting strangely.
Example my curren value is 1 and my targetaverage is 100k. Is should not scale up, but is should scale down.
This is a describe example:
The text was updated successfully, but these errors were encountered: