Ultimate access to all questions.
You have deployed a web application using a managed instance group based on an instance template. After modifying the startup script in the instance template, you need to apply these changes to all existing instances without reducing the available capacity, minimizing effort and cost, while the application continues to serve live traffic. What is the best approach?
Explanation:
Performing a rolling-action replace with max-unavailable set to 0 and max-surge set to 1 is the optimal solution. This approach ensures that no instances are taken out of service during the update (max-unavailable=0), and it allows for the creation of one additional instance (max-surge=1) to maintain capacity. The new instance is put into service before an old instance is taken out for replacement, ensuring no reduction in available capacity. This method meets all the requirements: it minimizes effort and cost, ensures the application continues to serve live traffic without interruption, and applies the startup script changes efficiently.
Other options either reduce capacity during the update, increase cost and complexity, or require manual intervention, which does not align with the requirements.