0

I am using a GCP region backend service to load balance across a set of instances in an unmanaged instance group. When I remove an instance from the group I want to know when I can safely delete the instance.

Connection draining is set to 0 seconds so as hinted by this post I am waiting until the instance no longer shows up in the health statuses of the backend service group and then waiting for an extra 60 seconds before deleting the instance; I assume the 60 seconds is required for the health status decision to be applied across GCP, but the only place I can find this time period mentioned is here and here, neither of which are definitive.

Is there any way to tell through the GCP APIs when I can safely remove an instance or do I need to make this decision using instance metrics (e.g. by waiting until no new connections have been made for a period of time).

1 Answer 1

-1

You can use API call backendServices.list to verify if the instance is still member of the backend service.

3
  • This only shows the backend groups but doesn't give information about the instances in the groups, that is why I am using the health statuses
    – dippynark
    Nov 22 at 23:33
  • In the same link, you can also read abour backendServices.getHealth
    – Ron Etch
    Nov 23 at 0:24
  • Yeah I link out to that same page in the question, but given GCP is a distributed system I wanted confirmation about whether it's safe to remove the instance as soon as it's no longer in the health status response or whether it's necessary to allow more time for the information to propagate
    – dippynark
    Nov 23 at 9:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .