Question about Horizontal and Vertical autoscaling best practices

Hi! I wonder if there are any guidelines for choosing between scaling vertically or scaling horizontally using the Kubernetes autoscalers.

  • When should one use the vertical autoscaler and when should one use the horizontal?
  • Is it recommended to use both to acheive best performance?
  • In the case that one uses both, what metrics are recommended?
  • Also, is there any detailed explaination of how the VPA recommendation algorithm works? (I can’t find any documentation that goes into algorithm details anywhere)

Would be very grateful if anyone had answers to any of the above questions! Thank you.

I think you would use the Vertical Pod Autoscaler to right size your workflows - ie- to ensure that your workflows request and limit the resources they require. You would use the Horizontal Pod Autoscaler for workflows that perform well when they’re dynamically scaled to meet unexpected bursts of traffic - ie- webapps seem to be the best candidate for the HPA. I can’t picture when you’d want to use both at the same time – I’m not sure if that’s recommended.

1 Like