I have one primary vm in an unmanaged instance group. To perform updates and maintenance, I'll add an updated VM to the group and then proceed to remove the existing one to update. I was thinking it shouldn't be any downtime by doing so. However, whenever I make a change to the backend, the server will be unavailable for 30 seconds. How can I avoid this downtime? Is it due to the healthcheck configuration?
Asked
Active
Viewed 387 times
1 Answers
0
Enable instance draining. This allows for existing connections to complete and begins the process of sending new traffic to the other instance.
Now you can remove a VM from the instance group without downtime. Wait for the instance draining time plus 60 seconds before modifying the instance.

John Hanley
- 74,467
- 6
- 95
- 159
-
Thanks! Didn't know about this feature. I checked that the connection draining is already enabled for a duration of 300s by default. Since there is still a downtime for my case, will it be better to lengthen the time? – jollysea Feb 13 '22 at 23:52
-
@jollysea - I would try a longer value to test. The answer depends on what you are running. – John Hanley Feb 14 '22 at 00:33