Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 68 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 68
Topic #: 1
[All Professional Cloud Developer Questions]

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?

  • A. Perform a rolling-action with maxSurge set to 1, maxUnavailable set to 0.
  • B. Perform a rolling-action with maxSurge set to 0, maxUnavailable set to 1
  • C. Perform a rolling-action with maxHealthy set to 1, maxUnhealthy set to 0.
  • D. Perform a rolling-action with maxHealthy set to 0, maxUnhealthy set to 1.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
donchick
Highly Voted 3 years, 11 months ago
B(maxSurge = 0, maxUnavailable = 1)
upvoted 22 times
Ayuewinc
3 years, 7 months ago
"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
upvoted 4 times
...
...
syu31svc
Highly Voted 3 years, 4 months ago
"number of instances should not increase" B would be correct
upvoted 5 times
...
anshad666
Most Recent 1 month, 2 weeks ago
Selected Answer: B
maxSurge = 0, maxUnavailable = 1)
upvoted 1 times
...
thewalker
4 months, 1 week ago
Selected Answer: 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.
upvoted 1 times
thewalker
4 months, 1 week ago
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.
upvoted 1 times
...
...
santoshchauhan
8 months, 3 weeks ago
Selected Answer: 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.
upvoted 2 times
...
Aeglas
1 year ago
Selected Answer: 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
upvoted 2 times
...
Kadhem
1 year ago
Selected Answer: 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
upvoted 1 times
...
__rajan__
1 year, 2 months ago
Selected Answer: 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.
upvoted 1 times
...
Teraflow
1 year, 8 months ago
Selected Answer: 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.
upvoted 1 times
closer89
1 year, 6 months ago
"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
upvoted 1 times
...
...
Foxal
1 year, 9 months ago
Selected Answer: A
the correct answers is A
upvoted 1 times
...
omermahgoub
1 year, 10 months ago
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
upvoted 2 times
omermahgoub
1 year, 10 months ago
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.
upvoted 1 times
...
...
tab02733
2 years, 1 month ago
Selected Answer: 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.
upvoted 2 times
...
tomato123
2 years, 3 months ago
Selected Answer: B
B is correct
upvoted 2 times
...
cloud_enth0325
2 years, 5 months ago
Selected Answer: 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.
upvoted 1 times
...
yogi_508
2 years, 7 months ago
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.
upvoted 2 times
...
morenocasado
2 years, 8 months ago
Selected Answer: B
As others suggested, B is the correct option. I am adding this to highlight the community choice.
upvoted 2 times
...
GCPCloudArchitectUser
2 years, 9 months ago
Selected Answer: 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
upvoted 1 times
GCPCloudArchitectUser
2 years, 9 months ago
I am confused here … it’s either A or B
upvoted 1 times
GCPCloudArchitectUser
2 years, 9 months ago
Ok thanks for link reference Excerpt
upvoted 1 times
GCPCloudArchitectUser
2 years, 9 months ago
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.
upvoted 1 times
GCPCloudArchitectUser
2 years, 9 months ago
That will be B
upvoted 1 times
...
...
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...