Google Professional Machine Learning Engineer Question 342
Select 2Google Cloud PlatformYou are deploying a machine learning model using Vertex AI Prediction to serve online predictions. The model is expected to experience fluctuating traffic, ranging from low usage during off-hours to high throughput during peak times. Which of the following approaches should you take to ensure the serving backend scales appropriately to handle the traffic while minimizing costs?
- A
Configure auto-scaling for the deployed model with a minimum and maximum replica count.
- B
Use a fixed number of replicas to ensure consistent performance for both high and low traffic periods.
- C
Enable online prediction logging to monitor traffic patterns and adjust the number of replicas manually.
- D
Set a high maximum concurrency per replica to reduce the required number of replicas during high traffic.
- E
Use different endpoints with separate deployments for peak and off-peak traffic.
Show answer and explanation
Correct answers: A, D
Explanation
To handle fluctuating traffic while minimizing costs, it is critical to configure auto-scaling, which ensures the serving backend scales seamlessly based on real-time throughput. Additionally, setting a high maximum concurrency per replica allows you to optimize resource usage during peak times. These approaches leverage Vertex AI features to provide a scalable and cost-effective solution.
- A. Correct.
Correct. Configuring auto-scaling allows Vertex AI Prediction to dynamically adjust the number of replicas based on traffic, ensuring optimal performance and cost efficiency.
- B. Incorrect.
Incorrect. Using a fixed number of replicas does not account for fluctuating traffic, leading to either under-provisioning during peak periods or wasted resources during low-traffic periods.
- C. Incorrect.
Incorrect. While logging traffic patterns can provide insights, manually adjusting replicas is inefficient and does not scale well for dynamic traffic conditions.
- D. Correct.
Correct. Setting a high maximum concurrency per replica allows each replica to handle more requests, which can help reduce the total number of replicas needed during high traffic.
- E. Incorrect.
Incorrect. Using separate deployments for peak and off-peak traffic adds unnecessary complexity and is not a recommended approach in Vertex AI Prediction.