Google Professional Machine Learning Engineer Question 341
Single answerGoogle Cloud PlatformYou are deploying a machine learning model using Vertex AI Prediction to serve online predictions. The traffic to your model's endpoint is highly variable, with significant spikes during certain hours of the day. To ensure optimal performance and cost efficiency, how should you configure the serving backend to automatically handle these traffic fluctuations?
- A
Set the minimum number of nodes to 0 and enable autoscaling.
- B
Set the minimum number of nodes to 1 and enable autoscaling.
- C
Configure a fixed number of nodes based on peak traffic estimates.
- D
Disable autoscaling and manually adjust the number of nodes as needed.
Show answer and explanation
Correct answer: B
Explanation
To efficiently handle highly variable traffic patterns in Vertex AI Prediction, enabling autoscaling with a minimum of one node is the optimal approach. This configuration ensures that at least one node is always ready to handle incoming requests, reducing latency, while autoscaling dynamically adjusts resources to match the traffic load, balancing performance and cost efficiency.
- A. Incorrect.
Setting the minimum number of nodes to 0 with autoscaling enabled may lead to cold starts, which can cause high latency during traffic spikes. This is not ideal for use cases requiring low-latency predictions.
- B. Correct.
Setting the minimum number of nodes to 1 and enabling autoscaling ensures that at least one node is always available to handle incoming requests, minimizing latency during traffic spikes. Autoscaling will automatically adjust the number of nodes based on traffic demands, ensuring both performance and cost efficiency.
- C. Incorrect.
Configuring a fixed number of nodes based on peak traffic estimates may ensure performance, but it is not cost-efficient during periods of low traffic, as resources will remain underutilized.
- D. Incorrect.
Disabling autoscaling and manually adjusting the number of nodes is inefficient and error-prone, as it requires constant monitoring and manual intervention, leading to potential delays and resource wastage.