My goal is simple: do not forward the traffic from ILB to the service deployed on the VM if it is busy (e.g. CPU>80%), if the CPU getting idle, re-add it back to the ILB rotation routine.
I did some reading. Some people suggest using a custom probe, so the ILB will check the probe status every 15 seconds and return a certain code to indicate service is healthy.
Could someone help point a direction on how to implement this type of CPU performance based probe?
Also, what if all VM r turn none 200 so load balancer has no node to forward to, will client request get denied or wait in a queue?
I am using iaas.
this will require you to have an service running on the VM that monitors the CPU. Then you need to use custom probes, point to a web page that return anything than 200 OK in case of cpu threshold exceeded. Are you just using Virtual machines (IaaS) or a cloud service (PaaS)?