Google Cloud Associate Cloud Engineer — Question 4
You have a single binary application that you want to run on Google Cloud Platform. You decided to automatically scale the application based on underlying infrastructure CPU usage. Your organizational policies require you to use virtual machines directly. You need to ensure that the application scaling is operationally efficient and completed as quickly as possible. What should you do?
Answer options
- A. Create a Google Kubernetes Engine cluster, and use horizontal pod autoscaling to scale the application.
- B. Create an instance template, and use the template in a managed instance group with autoscaling configured.
- C. Create an instance template, and use the template in a managed instance group that scales up and down based on the time of day.
- D. Use a set of third-party tools to build automation around scaling the application up and down, based on Stackdriver CPU usage monitoring.
Correct answer: B
Explanation
The correct answer is B because creating an instance template and using it in a managed instance group allows for direct management of virtual machines while enabling autoscaling based on CPU usage. Option A is incorrect as it involves Kubernetes, which does not align with the requirement for using virtual machines directly. Option C focuses on time-based scaling, which may not be the most efficient method for responding to real-time CPU usage. Option D suggests using third-party tools, which adds unnecessary complexity and does not guarantee operational efficiency.