Open trustin opened 5 years ago
@trustin any idea about how upstream server could propagate its state (like memory/disk..) to client side?
You can add more than one health checker when you build a HealthCheckService, then a load balancer or HealthCheckedEndpointGroup will notice when any of the HealthCheckers becomes unhealthy.
ah, seems I mistaken that you mean client side HealthChecker but seems that you talk about server side HealthCheck service, that should make sense
@trustin When I was working on healthChecker for my project and I thought that It would be good If Armeria has those healthChecker implementations as default :) !
Could I work on this issue?
Sure. Please tell us what kind of health checkers you'd like to implement first, though. :-)
Sure. Please tell us what kind of health checkers you'd like to implement first, though. :-)
@trustin
Memory based healthChecker Q : Do you want to the healthiness is determined by server's heap memory usage or system's memory usage? Either that or, provide both of them?
disk usage rate based healthChecker
Plus, what I want to suggest to implement is CPU based healthChecker that the healthiness is determined by average CPU usage which is a result of calculation of average during certain period of time(given by programmer) not by CPU rate at the moment It's asked.
In example,
public final class CpuBasedHealthChecker implements ListenableHealthChecker {
... abbreviate ..
public CpuBasedHealthChecker(TimeUnit unit, long interval, double threshold) {}
@Override
public isHealthy() {
return true when average of CPU usage rate in given interval is less than threshold
return false otherwise.
}
}
HealthChecker cpuBasedHealthChecker
= new CpuHealthChecker(TimeUnit.MINIUTES, 10, 0.8);
My reservations are that It could be a little bit ridiculous, because It should memorize and calculate periodically to determine whether It's healthy or because It's practically not usable.
What do you think about that?
Is it little bit ridiculous idea for healthChecker or inappropriate to be provided as default implementation?
could i continuing this issue?
Sure, it's all yours.
@ikhoon i sent out PR #4673 please take a look 🙏
@minwoox I also submitted a draft Pull request #4711 about this issue. Please take a look at it when you have a moment.
Looks like there was a follow-up. I'll add more health checkers, such as disk usage based. If there's still work to do on the memory health checker by the time I merge this, I'll follow up on that as well, @lazmond3. 🙇🏻♂️ Thanks.
My friend @AnneMayor wants to join, so I recommended this issue. @AnneMayor will implement a disk usage-based health checker. Please refer to the link below and implement a health checker based on disk usage.
P.S. There are several options, but this seems like a good place to start.
Thanks @Bue-von-hon :) I will look into the issue. I am going to open PR until June 18
It might be a little long to open PR. I need more time to review. I will let you know today when I could complete it.