Google Professional Machine Learning Engineer Question 388
Single answerGoogle Cloud PlatformYou are deploying a machine learning inference service that processes real-time predictions using a trained model. The service needs to handle sporadic traffic loads, scale down to zero when idle, and ensure secure communication. Which Google Cloud product and configuration would be the most appropriate for this use case?
- A
Deploy the model on Cloud Run and configure it to scale based on request volume.
- B
Deploy the model on a Compute Engine instance with a custom load balancer to handle scaling.
- C
Use Kubernetes Engine (GKE) with an autoscaling deployment to manage the model service.
- D
Deploy the model on App Engine Standard Environment with auto-scaling enabled.
Show answer and explanation
Correct answer: A
Explanation
Cloud Run is the best choice for deploying sporadically used services because it is serverless, scales automatically (including down to zero), and integrates seamlessly with containerized applications. It also provides built-in HTTPS support for secure communication, making it an ideal solution for deploying a machine learning inference service with these requirements.
- A. Correct.
This is the correct option. Cloud Run is serverless, supports scaling down to zero, and can automatically scale based on request volume. It also ensures secure communication with built-in HTTPS support.
- B. Incorrect.
While Compute Engine can handle custom scaling and load balancing, it requires more manual configuration and does not scale to zero, making it less cost-efficient for sporadic traffic.
- C. Incorrect.
GKE provides powerful autoscaling but is more complex to manage compared to Cloud Run. GKE does not scale down to zero instances without additional configurations, which may lead to unnecessary costs.
- D. Incorrect.
App Engine Standard Environment supports auto-scaling but is not as flexible for custom runtime environments as Cloud Run. It is also less optimized for containerized workloads, such as deploying ML models in containers.