-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Availability zone aware scaling #5443
Comments
Hello! If this is the case, I'm not sure if it's something doable by KEDA as KEDA relies on the HPA Controller, and AFAIK it doesn't support this "smart" logic sharing the workload and the HPA. I mean, you have 1 workload and 1 HPA, so from scaling pov, if you need an extra instance, it's the scheduler who decides where it has to be scheduled. If you want to achieve this behavior, you will need to split the workload into a workload per az and scaling them one by one. Maybe I'm missing some point and this is doable. WDTY @zroubalik ? |
Hello! |
I fully get the goal, but this seems more like a scheduling problem rather than scaling problem. KEDA scales, for example, deployments by telling it to scale out but it is up to the scheduler to decide on what node to start a new pod. Even if we create multiple HPAs or ScaledObjects (which is not good), we cannot achieve this goal. I think using topology spread constraints is the best approach for now |
Proposal
An ability to easily configure availability zone aware scaling, bringing up more pods in zones which are loaded more.
For example, suppose the target cpu utilization is 80%, while pods in availability zone a (AWS) have 90% and pods in other availability zones have 70%. Thus an average value would be below 80% assuming even split of pods between availability zones. The feature would allow to identify that az a needs more pods and schedule them.
This may need creation of multiple hpa objects and for hpa to support a filter on availability zone.
For custom metrics like Cloudwatch it may require a template for values, e.g. for dimension AvailabilityZone specify {{topology.kubernetes.io/zone}}.
Use-Case
Sometimes availability zones get uneven traffic, causing pods in a specific az being overloaded. Default approach of HPA and KEDA may not address this, since average metrics may look okay. A solution I could find involve create separate deployments and hpa/keda for each availability zone, but that's a lot of configuration considering multiple AWS regions, even while using Kustomize for Kubernetes configs. Simple configuration would help to adopt the feature.
Is this a feature you are interested in implementing yourself?
No
Anything else?
No response
The text was updated successfully, but these errors were encountered: