Google Associate Cloud EngineerPlanning and configuring a cloud solutionMedium

A team is developing a new serverless application that consists of several independent functions, each triggered by specific events (e.g., HTTP requests, messages on a queue, file uploads). They need a fully managed service that automatically scales individual functions and charges only for the compute time consumed. Which Google Cloud compute option is most appropriate?

  1. ACloud Functions
  2. BCompute Engine instances
  3. CApp Engine Flexible environment
  4. DGoogle Kubernetes Engine (GKE)
Show answer & explanation

Correct answer: A. Cloud Functions

Cloud Functions is a fully managed, serverless execution environment for single-purpose functions. It automatically scales based on events, and you only pay for the time your function runs, perfectly matching the requirements for event-driven, independent functions with usage-based billing.

Why the other options are wrong

  • B. Compute Engine requires managing VMs, which contradicts the 'serverless' and 'fully managed' requirements.
  • C. App Engine Flexible environment supports serverless deployment of web apps and APIs, but Cloud Functions is more granular for single-purpose, event-driven units of code.
  • D. GKE is for container orchestration and requires more management than a pure serverless function platform like Cloud Functions, and is not primarily event-driven at the function level.

Cloud Functions

Google Cloud's Function as a Service (FaaS) offering. It allows developers to deploy single-purpose functions that respond to events without managing servers or runtimes. It's fully managed and scales automatically.

  • Serverless and fully managed
  • Event-driven execution model
  • Pay-per-use (billed per invocation and compute time)
  • Supports various programming languages
  • Ideal for microservices, webhooks, data processing

Memory trick: Serverless: If your code is a 'spark', choose the 'cloud' that lets it fly free!

More Planning and configuring a cloud solution questions