Hello Spring Boot Team,
I would like to raise a small enhancement request please.
As mentioned during Spring One, a lot of work was spent on Spring Boot 2.4.x to integrate with Kubernetes more effectively. Looking at talks like Spring Boot loves K8s, What's new in Spring Boot 2.4, we learned a great deal about interesting features between Spring Boot and Kubernetes liveness/readiness probes.
This work alone is a game changer, allowing cloud native Spring Boot applications to have much better and direct integration with Kubernetes, allowing self healing, better traffic control and more.
May I ask if it is possible to have feature regarding autoscaling please?
As of today, in order to autoscale a Spring Boot app on Kubernetes, there are only very few (tedious) ways. One well known is to expose a corresponding metrics, such as http_server_requests_count
, and to propagate the metrics inside a time series, such as Prometheus. We then need another layer in Kubernetes side for autoscaling based on custom metrics, polling this time series.
A much efficient and cooler approach would be to allow Kubernetes to understand directly from Spring Boot app, similar to how Kubernetes understand Spring Boot's liveness and readiness today, the need to scale the application.
Would it be possible for Spring Boot team to confider this feature please?
Thank you
Comment From: wilkinsona
Thanks for the suggestion, but I don't think Spring Boot is in a good position to provide such a view of your application. Unlike liveness and readiness which is specifically about a single pod, the metrics used for auto-scaling are typically averaged across every pod. Kubernetes built-in metrics or external metrics are much better placed to provide such a view of the application and its pods.