I'm trying to setup GCP autoscaling for my application (video converting service) and I'm experiencing the following problem:
Let's say the autoscaler creates 3 new instances and in the each instance I have 4 running processes of converting video. Then 2 processes in each of the first 2 instances finished and average CPU consumption of cluster decreased. So GCP autoscaler decides to kill one of the instances. But I still have running processes on all instances despite average CPU consumption decreased.
Is it possible to check if my app doesn't have running processes and ready to be terminated (using endpoint?) before instance removing?