Exam Professional Cloud Developer All QuestionsBrowse all questions from this exam
Question 68

You have an application controlled by a managed instance group. When you deploy a new version of the application, costs should be minimized and the number of instances should not increase. You want to ensure that, when each new instance is created, the deployment only continues if the new instance is healthy.

What should you do?

    Correct Answer: B

    To ensure that costs are minimized and the number of instances does not increase, you should perform a rolling-action with maxSurge set to 0 and maxUnavailable set to 1. This configuration ensures that no additional instances beyond the targeted number are created during the update, which keeps costs low. Setting maxUnavailable to 1 allows one instance to be taken offline and replaced, ensuring the deployment continues only if the new instance is healthy, maintaining the required instance number during the update.

Discussion
donchickOption: B

B(maxSurge = 0, maxUnavailable = 1)

Ayuewinc

"costs should be minimized and the number of instances should not increase", maxSurge = 1 will increase the number of instances, so B would be the correct answer

syu31svcOption: B

"number of instances should not increase" B would be correct

santoshchauhanOption: A

Here's the reasoning: maxSurge: This parameter determines the number of additional instances that can be created above the target size of the instance group during the update. Setting maxSurge to 1 allows the instance group to create one extra instance beyond its target size. This extra instance is used to start a new version of your application, ensuring that there's always a running instance during the update process. maxUnavailable: This parameter specifies the number of instances that can be unavailable at any time during the update. Setting maxUnavailable to 0 ensures that there is no reduction in the number of available instances below the target size during the update process.

AeglasOption: B

maxSurge controls in a rolling update how many resources can be added above threshold of the MIG (managed instance group), while maxUnavailable controls the max number of instances that can be taken offline during update at the same time

omermahgoubOption: A

the correct answer would be A. Perform a rolling-action with maxSurge set to 1, maxUnavailable set to 0. This will minimize costs by only creating one new instance at a time, and will only continue the deployment if the new instance is healthy, ensuring a consistent latency experience for end users. https://cloud.google.com/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups#max_surge

omermahgoub

Option B is not a correct solution because setting maxSurge to 0 and maxUnavailable to 1 will not allow the deployment to continue if the new instance is not healthy. Option C is not a correct solution because maxHealthy and maxUnhealthy are not valid options for rolling-actions. Option D is not a correct solution because setting maxHealthy to 0 and maxUnhealthy to 1 will not allow the deployment to continue if the new instance is not healthy.

tab02733Option: B

This is the best site here. https://tech-lab.sios.jp/archives/18553 The site is in Japanese, so please translate and read it.

tomato123Option: B

B is correct

yogi_508Option: A

i'll go with A( number of instances should not increase--- for this number shouldn't increase than target size i think, it doesn't mean no new instances should be created, they are asking in question, like when new instance is being created, so surge >0,) https://cloud.google.com/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups#max_unavailable If you do not want any unavailable machines during an update, set the maxUnavailable value to 0 and the maxSurge value to greater than 0. With these settings, Compute Engine removes each old machine only after its replacement new machine is created and running.

morenocasadoOption: B

As others suggested, B is the correct option. I am adding this to highlight the community choice.

celia20200410Option: A

ANS: A Note: If you set both maxSurge and maxUnavailable properties and both properties resolve to 0, the Updater automatically sets maxUnavailable=1, to ensure that the automated update can always proceed. https://cloud.google.com/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups#max_surge Setting a higher maxSurge value speeds up your update, at the cost of additional instances, which are billed according to the Compute Engine price sheet.

thewalkerOption: A

The correct answer is A. Perform a rolling-action with maxSurge set to 1, maxUnavailable set to 0. Here's why: Rolling Update: A rolling update is the best approach for deploying new versions of your application to a managed instance group while minimizing downtime and ensuring a smooth transition. maxSurge : This parameter controls the maximum number of instances that can be added to the group during the update. Setting maxSurge to 1 means that only one additional instance will be created beyond the target size of the group. This helps to minimize costs by avoiding unnecessary instance creation. maxUnavailable : This parameter controls the maximum number of instances that can be taken offline during the update. Setting maxUnavailable to 0 ensures that no existing instances are taken offline until the newly created instance is healthy. This guarantees that the deployment only continues if the new instance is healthy.

thewalker

Let's break down why the other options are incorrect: B. Perform a rolling-action with maxSurge set to 0, maxUnavailable set to 1: This would allow one instance to be taken offline before the new instance is healthy, potentially causing downtime. C. Perform a rolling-action with maxHealthy set to 1, maxUnhealthy set to 0: maxHealthy and maxUnhealthy are not valid parameters for rolling updates. They are used for regional instance group managers, not managed instance groups. D. Perform a rolling-action with maxHealthy set to 0, maxUnhealthy set to 1: Similar to option C, these parameters are not applicable to managed instance groups.

KadhemOption: A

the correct answer is A i think If you do not want any unavailable machines during an update, set the maxUnavailable value to 0 and the maxSurge value to greater than 0. With these settings, Compute Engine removes each old machine only after its replacement new machine is created and running. https://cloud.google.com/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups#max_surge

RajanOption: A

Option A is best suited here as if we go with option B it does not ensures that deployment only continue if the new instance is healthy.

TeraflowOption: A

The correct answer is A. Performing a rolling update with maxSurge set to 1 and maxUnavailable set to 0 ensures that the deployment only continues if the new instance is healthy. The maxSurge parameter ensures that only one new instance is created at a time, while the maxUnavailable parameter ensures that the number of healthy instances does not decrease during the deployment. This will minimize costs by not creating unnecessary instances and will also ensure that the deployment is safe and does not impact the application's availability. Option B is incorrect because setting maxUnavailable to 1 would mean that one instance will be taken offline at a time, which could impact the application's availability during the deployment. Options C and D are incorrect because maxHealthy and maxUnhealthy are not valid parameters for a rolling update.

closer89

"costs should be minimized and the number of instances should not increase" its B with maxUnavailable=1, maxSurge=0 - you instance group will be decreased by 1 which is not prohibited

FoxalOption: A

the correct answers is A

cloud_enth0325Option: B

maxSurge specifies the maximum number (or percentage) of pods above the specified number of replicas (is the maximum number of new pods that will be created at a time) and maxUnavailable is the maximum number of old pods that will be deleted at a time. maxSurge = 0 would mean no extra pods with be created.

GCPCloudArchitectUserOption: B

Yes it should be B as question states deployment should stop if it is unhealthy… the only we can happen is to make it to 0 for maxSurge =1

GCPCloudArchitectUser

I am confused here … it’s either A or B

GCPCloudArchitectUser

Ok thanks for link reference Excerpt

GCPCloudArchitectUser

Note: If you set both maxSurge and maxUnavailable properties and both properties resolve to 0, the Updater automatically sets maxUnavailable=1, to ensure that the automated update can always proceed.

GCPCloudArchitectUser

That will be B