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?
Choose an answer
Tap an option to check your answer.
Correct answer: 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..
Why this is the answer
The correct approach is to use Cloud Scheduler to trigger a Cloud Function that stops and starts the non-production environments. Cloud Scheduler provides a reliable, managed cron service, and Cloud Functions allow for serverless execution of code to interact with Compute Engine instances. This automates the process of shutting down environments when not in use and bringing them back online, directly addressing the cost-saving goal during idle times. Changing machine types via a shell script on a production instance is risky and complex to manage, potentially impacting the critical production environment. Deploying on a managed instance group with autoscaling is designed for scaling based on load, not for scheduled shutdowns to save costs during idle periods. Using preemptible VMs for acceptance and development environments can save costs, but these VMs can be terminated at any time, which might disrupt work during office hours, making them unsuitable for environments that need to be available during specific times.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed