- A
Cloud Functions, which executes code functions in response to events or HTTP requests with no server management required
Cloud Functions is exactly the right fit: serverless, supports multiple languages, triggered by HTTP requests, billed per invocation, scales from zero automatically. Developers focus on writing function code with no infrastructure concerns.
- B
Compute Engine, which provides virtual machines for running code in any language
Why wrong: Compute Engine requires provisioning VMs, installing language runtimes, managing OS patches, and handling scaling. It is not serverless and requires significant infrastructure management.
- C
Cloud SQL, which runs SQL queries in response to HTTP requests
Why wrong: Cloud SQL is a managed relational database service. It stores and queries data; it doesn't execute arbitrary application code or serve HTTP requests.
- D
Persistent Disk, which stores code that can be executed on demand
Why wrong: Persistent Disk is block storage for VM instances. It stores data but has no code execution capability. Code stored on a Persistent Disk requires a VM to execute it.
Serverless Function Execution on Google Cloud: Cloud Functions vs Cloud Run
This GCDL practice question tests your understanding of google cloud products, services, and solutions. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A company wants to enable its developers to write and run code in various programming languages (Python, Node.js, Go) without provisioning or managing any servers. The code should execute in response to HTTP requests. Which Google Cloud product is designed for this serverless, function-level execution model?
Quick Answer
The answer is Cloud Functions, which is the correct choice because it is Google Cloud’s event-driven, serverless compute platform designed specifically for function-level execution. Unlike Cloud Run, which runs entire containerized applications, Cloud Functions allows developers to write and deploy single-purpose code in Python, Node.js, or Go that executes directly in response to HTTP requests, with automatic scaling and zero server management. On the Google Cloud Digital Leader exam, this question tests your ability to distinguish between serverless compute services—a common trap is confusing Cloud Run’s container model with Cloud Functions’ function-level model, but remember that Cloud Functions is the only product purpose-built for running discrete code snippets triggered by events or HTTP calls. A helpful memory tip: think “Functions for functions”—if the requirement is to run a small piece of code without worrying about containers or servers, Cloud Functions is your answer.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
Cloud Functions, which executes code functions in response to events or HTTP requests with no server management required
Cloud Functions is the correct choice because it is Google Cloud's event-driven, serverless compute platform that allows developers to write and deploy single-purpose functions in languages like Python, Node.js, and Go. These functions automatically scale and execute in response to HTTP triggers (e.g., HTTP requests) without any server provisioning or management, directly matching the requirement for a function-level execution model.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Cloud Functions, which executes code functions in response to events or HTTP requests with no server management required
Why this is correct
Cloud Functions is exactly the right fit: serverless, supports multiple languages, triggered by HTTP requests, billed per invocation, scales from zero automatically. Developers focus on writing function code with no infrastructure concerns.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Compute Engine, which provides virtual machines for running code in any language
Why it's wrong here
Compute Engine requires provisioning VMs, installing language runtimes, managing OS patches, and handling scaling. It is not serverless and requires significant infrastructure management.
- ✗
Cloud SQL, which runs SQL queries in response to HTTP requests
Why it's wrong here
Cloud SQL is a managed relational database service. It stores and queries data; it doesn't execute arbitrary application code or serve HTTP requests.
- ✗
Persistent Disk, which stores code that can be executed on demand
Why it's wrong here
Persistent Disk is block storage for VM instances. It stores data but has no code execution capability. Code stored on a Persistent Disk requires a VM to execute it.
Common exam traps
Common exam trap: answer the scenario, not the keyword
Google Cloud often tests the distinction between serverless compute (Cloud Functions) and managed services that still require server management (Compute Engine) or are not compute services at all (Cloud SQL, Persistent Disk), leading candidates to confuse database or storage services with code execution platforms.
Detailed technical explanation
How to think about this question
Cloud Functions uses a stateless execution environment where each function instance is ephemeral and can be scaled to zero when idle. Under the hood, HTTP-triggered functions are exposed via a Cloud Load Balancing endpoint that routes requests to the function runtime, and the function's code is executed in a containerized sandbox (gVisor) for isolation. A real-world scenario is building a lightweight REST API for a mobile app backend where each endpoint is a separate Cloud Function, eliminating the need to manage a full web server like Express.js or Flask.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Google Cloud products, services, and solutions — study guide chapter
Learn the concepts, then practise the questions
- →
Google Cloud products, services, and solutions practice questions
Targeted practice on this topic area only
- →
All GCDL questions
1,000 questions across all exam domains
- →
Google Cloud Digital Leader study guide
Full concept coverage aligned to exam objectives
- →
GCDL practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related GCDL practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Why Cloud Technology Can Transform Business practice questions
Practise GCDL questions linked to Why Cloud Technology Can Transform Business.
Fundamental Cloud Concepts practice questions
Practise GCDL questions linked to Fundamental Cloud Concepts.
Google Cloud Security practice questions
Practise GCDL questions linked to Google Cloud Security.
How Google Cloud Resources Are Managed practice questions
Practise GCDL questions linked to How Google Cloud Resources Are Managed.
Google Cloud Products and Services practice questions
Practise GCDL questions linked to Google Cloud Products and Services.
Why cloud technology is transforming business practice questions
Practise GCDL questions linked to Why cloud technology is transforming business.
Google Cloud products, services, and solutions practice questions
Practise GCDL questions linked to Google Cloud products, services, and solutions.
Scaling with Google Cloud operations practice questions
Practise GCDL questions linked to Scaling with Google Cloud operations.
Trust and security with Google Cloud practice questions
Practise GCDL questions linked to Trust and security with Google Cloud.
GCDL fundamentals practice questions
Practise GCDL questions linked to GCDL fundamentals.
GCDL scenario practice questions
Practise GCDL questions linked to GCDL scenario.
GCDL troubleshooting practice questions
Practise GCDL questions linked to GCDL troubleshooting.
Practice this exam
Start a free GCDL practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this GCDL question test?
Google Cloud products, services, and solutions — This question tests Google Cloud products, services, and solutions — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Cloud Functions, which executes code functions in response to events or HTTP requests with no server management required — Cloud Functions is the correct choice because it is Google Cloud's event-driven, serverless compute platform that allows developers to write and deploy single-purpose functions in languages like Python, Node.js, and Go. These functions automatically scale and execute in response to HTTP triggers (e.g., HTTP requests) without any server provisioning or management, directly matching the requirement for a function-level execution model.
What should I do if I get this GCDL question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more ways this is tested on GCDL
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A developer wants to run a small piece of code that resizes images whenever a new image is uploaded to Cloud Storage. The code runs for less than a second and should only be triggered by the upload event. No always-on server is needed. Which Google Cloud service is ideal?
easy- A.A Compute Engine VM that runs continuously, checking for new uploads every minute.
- ✓ B.Cloud Functions triggered by Cloud Storage object creation events.
- C.Cloud Run with a permanent container that listens for uploads.
- D.BigQuery scheduled query that processes new uploads daily.
Why B: Cloud Functions is the ideal serverless compute service for event-driven, short-lived tasks like image resizing triggered by Cloud Storage uploads. It automatically scales to zero when idle, charges only for execution time (sub-second in this case), and natively binds to Cloud Storage object creation events via the `google.storage.object.finalize` trigger, eliminating the need for any always-on infrastructure.
Keep practising
More GCDL practice questions
- A DevOps team wants to adopt GitOps practices for managing their Google Cloud infrastructure. Which combination of tools…
- A startup is building an application that sends daily promotional push notifications to millions of mobile users on both…
- An organization's leadership wants to foster a 'fail fast' culture to accelerate innovation. A cloud environment directl…
- A company's on-premises applications occasionally need more compute capacity than their own infrastructure can provide (…
- A digital media company hosts video content globally. They want to reduce origin server load and deliver content faster…
- A security audit finds that a company's application service accounts have been granted broad IAM roles (e.g., Storage Ad…
Last reviewed: Jun 30, 2026
This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.