Compare / Cloud Run functions vs Cloud Run services
Cloud Run functions vs Cloud Run services
Both are serverless and scale to zero. Cloud Run functions (formerly Cloud Functions) run a single function in response to an event or HTTP request. A current Cloud Run function is deployed as a Cloud Run service. Services also accept source deployments or custom containers for applications with multiple routes and custom dependencies.
In 22 practice questions across 8 practice banks
You already have a containerized HTTP API with several routes and custom system libraries. You want a serverless deployment without adapting the API to a single Functions Framework handler. Which deployment fits?
-
Functions use the Functions Framework handler model in supported runtimes. They are useful for focused HTTP or event handlers, but are not the direct deployment path for this existing custom container.
-
A Cloud Run service can run the existing containerized API, provided the image satisfies the Cloud Run container runtime contract.
Pick an answer to see why each option is right or wrong.
Try 20 questions freeAt a glance
| Cloud Run functions | Cloud Run services | |
|---|---|---|
| Unit of deployment | Function source built into a Cloud Run service | Source code or a container image that meets the runtime contract |
| Triggers | HTTP and events (Pub/Sub, Cloud Storage, Eventarc) | HTTP, gRPC, WebSockets; events through Eventarc |
| Runtime control | Supported language runtimes | Custom runtime and system libraries; must satisfy the Cloud Run container contract |
| Typical use | Glue code, lightweight event handlers | APIs, web apps and services with several endpoints |
Choose Cloud Run functions when
- A small piece of code should react to an event such as a file upload or a message.
- You want the Functions Framework handler model in a supported runtime.
- The logic is a single, short-lived handler.
Choose Cloud Run services when
- You already have a container or need custom system dependencies.
- The service exposes several routes or requires a custom container; current functions also support concurrency.
- You want the same container to run elsewhere.
Exam tip
Event-driven handlers point to functions; custom containers or multiple endpoints point to services. Check the generation in older questions: Cloud Run functions (1st gen) has different capabilities from current Cloud Run functions. Do not assume all functions lack concurrency or require a separate platform.
Official documentation
Practice banks covering this comparison
Counts match names or aliases from both sides of the comparison in question text or answer options, including incorrect options. They do not measure how often a decision appears on the official exam.
- PCD Professional Cloud Developer · 7 questions
- ACE Associate Cloud Engineer · 5 questions
- CDL Cloud Digital Leader · 3 questions
- PSOE Professional Security Operations Engineer · 2 questions
- PAA Professional Agentic Architect · 2 questions
- PCA Professional Cloud Architect · 1 question
- PCDOE Professional Cloud DevOps Engineer · 1 question
- PCNE Professional Cloud Network Engineer · 1 question
More comparisons
- Cloud Run vs GKE
- App Engine vs Cloud Run
- BigQuery vs Bigtable
- Dataflow vs Dataproc
- Spanner vs Cloud SQL
- Cloud Composer vs Workflows
- Firestore vs Bigtable
- Cloud SQL for PostgreSQL vs AlloyDB
- Shared VPC vs VPC Network Peering
- Cloud VPN vs Cloud Interconnect
- Cloud Storage classes: Standard, Nearline, Coldline or Archive?
- Cloud Armor vs VPC firewall rules
- Memorystore vs Firestore
- Looker vs Looker Studio
- Pub/Sub vs Cloud Tasks
- Google-managed keys vs Customer-managed keys (CMEK)
- Identity-Aware Proxy vs VPN
- Compute Engine vs GKE
- Spanner vs Bigtable
- BigQuery vs Cloud SQL
- Firestore vs Cloud SQL
- Dataproc vs BigQuery
- GKE Autopilot vs Standard: which mode to choose?
- Vertex AI vs BigQuery ML
- VPC Service Controls vs IAM
- Private Google Access vs Cloud NAT