Professional Cloud Architect Exam QuestionsBrowse all questions from this exam

Professional Cloud Architect Exam - Question 111


Your company is running its application workloads on Compute Engine. The applications have been deployed in production, acceptance, and development environments. The production environment is business-critical and is used 24/7, while the acceptance and development environments are only critical during office hours. Your CFO has asked you to optimize these environments to achieve cost savings during idle times. What should you do?

Show Answer
Correct Answer: B

To optimize costs for environments that are only critical during office hours, using Cloud Scheduler to trigger a Cloud Function to start and stop the development and acceptance environments outside of office hours is the most efficient approach. This method ensures that resources are only consumed when necessary, offering significant cost savings compared to running these instances 24/7. Additionally, Cloud Scheduler and Cloud Functions are reliable and straightforward to implement, providing automation without complex configurations.

Discussion

17 comments
Sign in to comment
pamepaderoOption: B
Jul 7, 2021

B is the answer. https://cloud.google.com/blog/products/it-ops/best-practices-for-optimizing-your-cloud-costs Schedule VMs to auto start and stop: The benefit of a platform like Compute Engine is that you only pay for the compute resources that you use. Production systems tend to run 24/7; however, VMs in development, test or personal environments tend to only be used during business hours, and turning them off can save you a lot of money! https://cloud.google.com/blog/products/storage-data-transfer/save-money-by-stopping-and-starting-compute-engine-instances-on-schedule Cloud Scheduler, GCP’s fully managed cron job scheduler, provides a straightforward solution for automatically stopping and starting VMs. By employing Cloud Scheduler with Cloud Pub/Sub to trigger Cloud Functions on schedule, you can stop and start groups of VMs identified with labels of your choice (created in Compute Engine). Here you can see an example schedule that stops all VMs labeled "dev" at 5pm and restarts them at 9am, while leaving VMs labeled "prod" untouched

Ric350
Jul 15, 2022

Great answer and documentation. Def B

rzygor
Jul 30, 2022

Question says that dev/test are "not critical", it doesn't mean that they are not needed at all ...

sgofficial
Aug 1, 2022

Excellent ......even the good CFO is telling leave the office after 5.oo and come next day to work :)

kopper2019Option: B
Jul 1, 2021

Ans ) B , assuming VM doesn't need to be up after office hours .

woolooOption: C
Jul 27, 2023

"are only critical during office hours" does not mean it could be completely stopped. So may the option C correct?

werdy92Option: C
Oct 23, 2023

really wondering why not C...Not critical is not equivalent with not running at all....

parthkulkarni998
Dec 21, 2023

Also managed instance group reduces instances in case of low/no-traffic incurring lesser charges. Ideally, its a cleaner approach considering the ask is to optimize during "idle time". Incase people are working in different time zones, late shifts it doesnt make sense to trigger shutdown at a predefined times.

windsor_43Option: B
Dec 31, 2022

The Answer is B. Just had my exam today with a pass, this question was in the exam. Dated 31/12/22 Thanks to this site it was by far my most valuable

PAUGURUOption: D
Feb 19, 2023

Since the price of preemptibles is 1/4 the price of a standard machine D costs far less than B since office hours are 1/3 of whole day. It costs less to keep them running 24h as preemptibles.

DevOpsifier
Jun 13, 2023

Yes, but preemptibles use GCP excess resources so you will achieve the opposite of the desired effect, during office hours, they will underperform in the best case (worst case will stop altogether) and, during non-office hours, preemptibles will work well...

mifrahOption: A
Mar 25, 2023

In my opinion B is over-engineered: Why not just add an "instance schedule" for start/stop the Compute Engines? Why creating a scheduler and writing a Cloud Function...

ccpmad
Jun 8, 2024

Just exactly what I have thought. It is enough with instance schedule". But GCP wants you to spend money and use cloud functions LOL

the1dvOption: C
Jan 16, 2024

MIG's with autoscaling will scale to Zero if not needed

spuyol
Feb 3, 2024

some risks are added if you have different architecture on PRO and PRE envs

spuyolOption: D
Feb 3, 2024

Answer D A: too complex and maybe small or zero saving if you can't find a valid smaller machine type B: Not valid. Question says that PRE environments are not critical after office hours. But it doesn't say no service at all C: Some risk is introduced if you have different architecture on PRE than PRO envs D: It's the only valid and realiable option. Simple and effective. It's my choice. In a real scenario I will first start with this and then review if the savings are enough before more complicated choices

Gino17m
Apr 19, 2024

Ad. "B: Not valid. Question says that PRE environments are not critical after office hours. But it doesn't say no service at all" But the Question says that PRE environments are critical during office hours, so you can't use preemptible VMs - "Compute Engine might stop (preempt) these instances if it needs to reclaim the compute capacity for allocation to other VMs"

parthkulkarni998Option: C
Dec 21, 2023

Also managed instance group reduces instances in case of low/no-traffic incurring lesser charges. Ideally, its a cleaner approach considering the ask is to optimize during "idle time". Incase people are working in different time zones, late shifts it doesnt make sense to trigger shutdown at a predefined times.

oms_mucOption: B
Dec 21, 2022

As B seems the best answer, sadly it's not precise, as you need pub/sub in between. https://cloud.google.com/scheduler/docs/overview

omermahgoubOption: B
Dec 22, 2022

The correct answer is B. Use Cloud Scheduler to trigger a Cloud Function that will stop the development and acceptance environments after office hours and start them just before office hours. One way to optimize the cost of your Compute Engine environments is to stop non-critical instances when they are not in use. In this case, you could use Cloud Scheduler to trigger a Cloud Function that will stop the acceptance and development environments after office hours and start them just before office hours. This will allow you to take advantage of the cost savings of not running these environments during idle times, while still ensuring that they are available during office hours when they are critical.

omermahgoub
Dec 22, 2022

Option A, creating a shell script to change the machine type of the development and acceptance instances, is not relevant because it does not address the issue of cost optimization during idle times. Option C, using a managed instance group with autoscaling, is not recommended because it would not allow you to take advantage of the cost savings of stopping the instances during idle times. Option D, using preemptible VMs for the acceptance and development environments, is also not recommended because preemptible VMs may be terminated by Google at any time, which would not be suitable for workloads that are critical during office hours.

MaryMeiOption: B
Feb 23, 2023

https://cloud.google.com/compute/docs/instances/viewing-and-applying-idle-vm-recommendations B seems close to this Google provided service option, the extra step should be using idle VM recommendations to find and stop idle VM instances to reduce waste of resources

odacirOption: B
Nov 18, 2023

B is the answer. But today, you don't need complicated CRON + CF. Auto shutdown by cron expression it's a feature built in: https://cloud.google.com/compute/docs/instances/schedule-instance-start-stop

AWS_SamOption: B
Jan 3, 2024

B for sure

dija123Option: B
Apr 8, 2024

Agree with B

Gino17mOption: B
Apr 19, 2024

B is right answer