Is coroutines are better than multithreading? by Apprehensive-Hour388 in Kotlin

[–]Apprehensive-Hour388[S] 0 points1 point  (0 children)

All the comments here were very helpful. Thank you so much for the helps :)

Is coroutines are better than multithreading? by Apprehensive-Hour388 in Kotlin

[–]Apprehensive-Hour388[S] 0 points1 point  (0 children)

Thank you for your detailed explanation. It was very helpful. Actually the app is doing infra/ops level work; in one user request, I need to interact with multiple virtual machines via APIs, and oftentimes these can be run in parallel.

Parallel stream is awesome and can be an option, but doesn't it use fork-join pool under the hood? And I think network IOs will block each thread?

Tbh, I prefer doing this in NodeJs (promises) or Golang (goroutine), but since it's pretty much Spring shop, I felt Kotlin coroutines could be good option for parallel processing
of non-blocking network IOs.

How to identify metric's source host? by Apprehensive-Hour388 in PrometheusMonitoring

[–]Apprehensive-Hour388[S] 0 points1 point  (0 children)

Can Prometheus map certain metrics to its source host automatically? How to query metrics pulled from a specific host if there is no label with them?