Ensure High Availability During Web Application Deployment | Ace: Associate Cloud Engineer Exam

Best Practices for Deploying a New Version of Your Web Application

Question

You have a web application deployed as a managed instance group.

You have a new version of the application to gradually deploy.

Your web application is currently receiving live web traffic.

You want to ensure that the available capacity does not decrease during the deployment.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C.

To deploy a new version of a web application on a managed instance group without impacting the availability of the application, you can use a rolling update strategy. A rolling update strategy updates a subset of instances at a time and verifies their health before moving on to the next subset. This allows for a smooth transition to the new version without reducing the capacity of the application.

Option A is incorrect because maxSurge set to 0 means that no new instances will be created during the update. This can lead to a situation where the capacity of the application is reduced during the update.

Option B is incorrect because maxUnavailable set to 0 means that all instances must be available during the update. This can cause a longer update time and may not be practical in situations where the update requires some downtime.

Option C is a valid option but requires creating a new managed instance group, adding it to the backend service for the load balancer, and then deleting the old managed instance group once all instances in the new group are healthy. This can lead to a longer deployment time, and there is a risk of losing session data during the transition.

Option D is the correct answer. It involves creating a new instance template with the new application version, updating the existing managed instance group with the new instance template, and deleting the instances in the managed instance group to allow the managed instance group to recreate the instances using the new instance template. This allows for a smooth transition to the new version without reducing the capacity of the application. The instances are recreated with the new application version, and the update can be completed with minimal downtime.