Google Cloud Professional Cloud Developer — Question 303
You are developing a new API that creates requests on an asynchronous message service. Requests will be consumed by different services. You need to expose the API by using a gRPC interface while minimizing infrastructure management overhead. How should you deploy the API?
Answer options
- A. Deploy your API to App Engine. Create a Pub/Sub topic, and configure your API to push messages to the topic.
- B. Deploy your API as a Cloud Run service. Create a Pub/Sub topic, and configure your API to push messages to the topic.
- C. Deploy your API to a GKE cluster. Create a Kafka cluster, and configure your API to write messages to the cluster.
- D. Deploy your API on a Compute Engine instance. Create a Kafka cluster, and configure your API to write messages to the cluster.
Correct answer: B
Explanation
The correct answer is B because deploying the API as a Cloud Run service allows for automatic scaling and reduces infrastructure management, which aligns with the requirement to minimize overhead. Options A, C, and D involve either App Engine or require more complex cluster management with Kafka, which doesn't meet the goal of minimizing infrastructure management.