Your App Engine standard configuration is as follows: service: production instance_class: B1 You want to limit the application to 5 instances.
Which code snippet should you include in your configuration?
Click on the arrows to vote for the correct answer
A. B. C. D.C.
The correct answer is B. manual_scaling: max_instances: 5 idle_timeout: 10m.
Explanation: In the given scenario, the requirement is to limit the application to 5 instances. This can be achieved by using manual scaling in the App Engine standard environment. The manual_scaling element of the app.yaml configuration file is used to specify the number of instances to run.
Option A: manual_scaling: instances: 5 min_pending_latency: 30ms This option specifies that the application should run with 5 instances and that each instance should have a minimum pending latency of 30 milliseconds. However, it does not limit the number of instances to 5, and additional instances may be created based on the demand.
Option B: manual_scaling: max_instances: 5 idle_timeout: 10m This option specifies that the application should run with a maximum of 5 instances and that any idle instances should be shut down after 10 minutes. This ensures that the application is limited to 5 instances and does not consume unnecessary resources.
Option C: basic_scaling: instances: 5 min_pending_latency: 30ms This option is not applicable as the basic_scaling configuration is used to automatically scale an application based on the request rate. It does not allow you to specify the exact number of instances to run.
Option D: basic_scaling: max_instances: 5 idle_timeout: 10m. This option is not applicable as the basic_scaling configuration is used to automatically scale an application based on the request rate. It does not allow you to specify the exact number of instances to run.
In conclusion, option B is the correct answer as it limits the application to 5 instances and ensures that idle instances are shut down after 10 minutes.