Why custom metrics?

The CPU or RAM consumption of an application may not indicate the right metric for scaling always. For example, if you have a message queue consumer which can handle 500 messages per second without crashing. Once a single instance of this consumer is handling close to 500 messages per second, you may want to scale the application to two instances so that load is distributed across two instances. Measuring CPU or RAM is a fundamentally flawed approach for scaling such an application and you would have to look at a metric which relates more closely to the application’s nature. The number of messages that an instance is processing at a given point in time is a better indicator of actual load on that application. Similarly, there might be applications where other metrics makes more sense and these can be defined using custom metrics in Kubernetes.

In this post will do a walkthrough of how kubernetes autoscaling can be implemented for custom metrics generated by the application.

#kubernetes #autoscaling #custom-metrics #infracloud #prometheus

Kubernetes Autoscaling with Custom Metrics (updated)
1.15 GEEK