Your company is running a stateless application on a Compute Engine instance.
The application is used heavily during regular business hours and lightly outside of business hours.
Users are reporting that the application is slow during peak hours.
You need to optimize the application's performance.
What should you do?
Click on the arrows to vote for the correct answer
A. B. C. D.C.
To optimize the performance of the stateless application running on a Compute Engine instance, we need to focus on two key areas: scaling and resource allocation. Based on the given scenario, the application is heavily used during business hours and lightly used outside business hours. This suggests that we need to scale the application dynamically based on usage patterns to ensure optimal performance.
In addition, we need to ensure that the application is allocated sufficient resources to handle the workload during peak usage. With that in mind, let's examine the answer options:
A. Create a snapshot of the existing disk. Create an instance template from the snapshot. Create an autoscaled managed instance group from the instance template.
This option is a good approach to creating an autoscaled managed instance group based on a snapshot of the existing disk. However, it does not address the issue of scaling dynamically based on usage patterns. Therefore, this option may not be the optimal solution for the given scenario.
B. Create a snapshot of the existing disk. Create a custom image from the snapshot. Create an autoscaled managed instance group from the custom image.
This option is similar to option A, but it involves creating a custom image instead of an instance template from the snapshot. Again, this option does not address the issue of dynamic scaling, which is crucial for optimizing application performance.
C. Create a custom image from the existing disk. Create an instance template from the custom image. Create an autoscaled managed instance group from the instance template.
This option involves creating a custom image from the existing disk and using it to create an instance template, which is then used to create an autoscaled managed instance group. This option addresses the issue of scaling dynamically based on usage patterns, which is achieved through the use of autoscaling. With autoscaling, the number of instances in the managed instance group can be increased or decreased based on the application's workload. This option also allows for resource allocation to be adjusted dynamically as the workload changes.
D. Create an instance template from the existing disk. Create a custom image from the instance template. Create an autoscaled managed instance group from the custom image.
This option is similar to option C, but it involves creating a custom image from the instance template instead of the existing disk. While this option can also achieve dynamic scaling and resource allocation, it involves an extra step that may not be necessary.
Overall, option C is the optimal solution for optimizing the performance of the stateless application on the Compute Engine instance. It addresses the key issue of dynamic scaling based on usage patterns, which is crucial for ensuring optimal performance.