nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #283

You are tasked with using C++ to build and deploy a microservice for an application hosted on Google Cloud. The code needs to be containerized and use several custom software libraries that your…

The correct answer is B. Use Cloud Build to create the container, and deploy it on Cloud Run. Cloud Build can build a Docker container from any language or custom dependencies (including C++ with custom libraries), and Cloud Run is a fully managed serverless platform - you deploy a container image and Google manages all underlying infrastructure, scaling, and patching…

Deploying applications

Question

You are tasked with using C++ to build and deploy a microservice for an application hosted on Google Cloud. The code needs to be containerized and use several custom software libraries that your team has built. You do not want to maintain the underlying infrastructure of the application. How should you deploy the microservice?

Options

  • AUse Cloud Functions to deploy the microservice.
  • BUse Cloud Build to create the container, and deploy it on Cloud Run.
  • CUse Cloud Shell to containerize your microservice, and deploy it on a Container-Optimized OS
  • DUse Cloud Shell to containerize your microservice, and deploy it on standard Google Kubernetes

How the community answered

(37 responses)
  • A
    8% (3)
  • B
    84% (31)
  • C
    5% (2)
  • D
    3% (1)

Explanation

Cloud Build can build a Docker container from any language or custom dependencies (including C++ with custom libraries), and Cloud Run is a fully managed serverless platform - you deploy a container image and Google manages all underlying infrastructure, scaling, and patching. Option A (Cloud Functions) does not natively support C++ runtimes. Options C and D require you to manage VMs or GKE clusters, violating the 'no infrastructure maintenance' requirement. Cloud Run is the ideal fit: bring any container, zero infrastructure to manage.

Topics

#Containerization#Serverless Compute#Microservices#Cloud Run

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice