admin管理员组文章数量:1289542
We recently migrated our applications from Java 17 to Java 21 to leverage VirtualThreads. We used to scale our applications based on tomcat blocked threads count
Now since we started leveraging VirtualThreads,is there anyway we can emit VirtualThread metrics so that we can autoscale based on the metrics? Or any other best practices
We recently migrated our applications from Java 17 to Java 21 to leverage VirtualThreads. We used to scale our applications based on tomcat blocked threads count
Now since we started leveraging VirtualThreads,is there anyway we can emit VirtualThread metrics so that we can autoscale based on the metrics? Or any other best practices
Share Improve this question edited Feb 20 at 11:03 user29725406 asked Feb 20 at 10:38 user29725406user29725406 11 bronze badge 2- Good question! Since Virtual Threads work differently from platform threads, traditional blocked thread metrics may not be as useful. Are you using a specific autoscaling mechanism (e.g., Kubernetes HPA, AWS Auto Scaling) or a monitoring tool like Micrometer, Prometheus, or JFR? Knowing this could help suggest the best way to collect and expose Virtual Thread metrics for scaling. – Natan Cox Commented Feb 21 at 8:26
- Thanks @NatanCox We are leveraging Kubernetes HPA which scales based on external prometheus metrics (Keda is being used) – user29725406 Commented Feb 21 at 10:38
1 Answer
Reset to default 0It seems that Micrometer supports virtual thread metrics, cfr https://docs.micrometer.io/micrometer/reference/reference/jvm.html#_java_21_metrics.
As mentioned in the documentation, you need the io.micrometer:micrometer-java21 dependency.
本文标签: spring bootAutoscale based on Virtual ThreadsStack Overflow
版权声明:本文标题:spring boot - Autoscale based on Virtual Threads - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741443262a2379041.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论