I have a Virtual Machine Scale Set and a Load Balancer (regular LB, not Application Gateway). A health probe check an HTTP endpoint on the VM, which seems to work just fine: the endpoint returns a non-200 response if it knows it's not ready to process requests, which is a controlled and frequent state.
Problem: The lowest possible setting for probes are 5 seconds, and 2 consecutive failures, so at least 10 seconds will pass before a faulty VM is pulled from rotation. This is too long to wait since many requests could arrive and be rejected in that time period, even though the VM is aware of this state, and other VMs in the scale set are ready to process requests.
Question: Is there any way for the VM to instantly notify the load balancer that it wants to be pulled from rotation? The VM should then stay out of rotation until it starts returning 200 OK
from the HTTP health probe endpoint.
Sidenote: az network nic ip-config address-pool remove
(link) only seems to work for standalone VMs, not scale set VMs.