---
id: "google-cloud-functions"
type: "component"
kind: "app-server"
provider: "gcp"
category: "compute"
aliases: "GCF"
docs: "https://cloud.google.com/sdk/gcloud/reference/functions/deploy"
url: "https://localhost:3000/catalogue/components/google-cloud-functions"
---

# Cloud Run functions

Single function deployed on Cloud Run's serving infrastructure, scaling from zero.

| | |
|---|---|
| Provider | [gcp](https://localhost:3000/catalogue?provider=gcp) |
| Kind | [Application server](https://localhost:3000/catalogue/kinds/app-server) |
| Category | Compute |
| Official docs | [https://cloud.google.com/sdk/gcloud/reference/functions/deploy](https://cloud.google.com/sdk/gcloud/reference/functions/deploy) |
| Also known as | GCF |

## Properties

| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| `autoscaling` | boolean | — | no | false | **true** |
| `criticality` (advanced) | enum | `low`, `medium`, `high` | no | "medium" | inherited |
| `httpsOnly` | boolean | — | no | true | inherited |
| `ingressSettings` | enum | `all`, `internal-only`, `internal-and-cloud-load-balancing` | no | "all" | inherited |
| `instancePerEntity` (advanced) | boolean | — | no | false | inherited |
| `instances` | integer | — | no | — | inherited |
| `managed` | boolean | — | no | false | **true** |
| `maxInstances` | integer | — | no | 0 | inherited |
| `memoryMb` | integer | — | no | 256 | inherited |
| `minInstances` | integer | — | no | 0 | inherited |
| `ownsData` (advanced) | boolean | — | no | true | inherited |
| `runtime` | string | — | no | — | inherited |
| `shardingStrategy` (advanced) | enum | `none`, `consistent-hash`, `range`, `lookup` | no | "none" | inherited |
| `singleWriter` (advanced) | boolean | — | no | false | inherited |
| `stateless` | boolean | — | no | true | **true** |
| `timeoutSeconds` | integer | — | no | 60 | inherited |
| `trigger` | enum | `http`, `pubsub`, `storage`, `firestore`, `eventarc`, `schedule` | no | — | inherited |

Bold values are the ones this component pins.

## Rules that apply · 4

### Inline external call without durable fallback `external-call-inline-without-durable-path` (warning)

- Page: https://localhost:3000/catalogue/rules/external-call-inline-without-durable-path.md
- Why: A service that calls a third party synchronously, with no queue or workflow engine attached, has nowhere to park the request when the third party is slow or down. The failure becomes the user's problem instead of a retried job.
- Applies to: every node of kind app-server
- Message: Service '{{node.id}}' calls a third party inline with no queue or workflow engine to fall back to when that call fails.

It fires when:

- all of these hold:
  - the node has at least one synchronous outgoing edge to a third-party-api
  - this does not hold:
    - the node has at least one connected edge joining a workflow-engine or queue

### Fan-out inline in the request path `fanout-inline-in-request-path` (warning)

- Page: https://localhost:3000/catalogue/rules/fanout-inline-in-request-path.md
- Why: Calling a worker synchronously puts the background job on the request path. The caller waits for the slowest part of the fan-out.
- Applies to: every node of kind app-server
- Message: Service '{{node.id}}' calls a worker synchronously. Hand the job to a queue or stream so the request path does not wait for fan-out.

It fires when:

- the node has at least one synchronous outgoing edge to a worker

### Stateful hash ring without ring manager `stateful-hash-ring-without-ring-manager` (warning)

- Page: https://localhost:3000/catalogue/rules/stateful-hash-ring-without-ring-manager.md
- Why: A stateful service on a consistent hash ring needs something that owns the ring: detect a dead host, pick a replacement, tell everyone. Without a coordination service the ring is edited by hand during the outage.
- Applies to: every node of kind app-server
- Message: Service '{{node.id}}' is on a consistent hash ring but is not connected to a coordination service that manages the ring.

It fires when:

- all of these hold:
  - the node's `shardingStrategy` is "consistent-hash"
  - this does not hold:
    - the node has at least one connected edge joining a coordination-service

### Stateful node without zone redundancy `stateful-node-without-zone-redundancy` (error)

- Page: https://localhost:3000/catalogue/rules/stateful-node-without-zone-redundancy.md
- Why: A stateful compute node pinned to exactly one availability zone disappears with that zone, and its state goes with it. Nodes inside a cell are exempt, because there the cell is deliberately single-zone and redundancy comes from the other cells.
- Applies to: every node in category compute
- Message: Stateful node '{{node.id}}' lives in exactly one availability zone. A zone outage takes its state with it.

It fires when:

- all of these hold:
  - the node's `stateless` is false
  - the node sits inside exactly 1 availability-zone group
  - this does not hold:
    - the node sits inside at least one cell group

## Other products of the same kind · 98

- [Elastic Container Instance](https://localhost:3000/catalogue/components/alibaba-eci.md) `alibaba-eci` — alibabacloud
- [Enterprise Distributed Application Service](https://localhost:3000/catalogue/components/alibaba-edas.md) `alibaba-edas` — alibabacloud
- [Function Compute](https://localhost:3000/catalogue/components/alibaba-function-compute.md) `alibaba-function-compute` — alibabacloud
- [Serverless App Engine](https://localhost:3000/catalogue/components/alibaba-sae.md) `alibaba-sae` — alibabacloud
- [YIDA](https://localhost:3000/catalogue/components/alibaba-yida.md) `alibaba-yida` — alibabacloud
- [AWS App Runner](https://localhost:3000/catalogue/components/aws-app-runner.md) `aws-app-runner` — aws
- [AWS App Studio](https://localhost:3000/catalogue/components/aws-app-studio.md) `aws-app-studio` — aws
- [CloudFront Functions](https://localhost:3000/catalogue/components/aws-cloudfront-functions.md) `aws-cloudfront-functions` — aws
- [AWS Elastic Beanstalk](https://localhost:3000/catalogue/components/aws-elastic-beanstalk.md) `aws-elastic-beanstalk` — aws
- [AWS Fargate](https://localhost:3000/catalogue/components/aws-fargate.md) `aws-fargate` — aws
- [Amazon GameLift Servers](https://localhost:3000/catalogue/components/aws-gamelift.md) `aws-gamelift` — aws
- [Lambda@Edge](https://localhost:3000/catalogue/components/aws-lambda-edge.md) `aws-lambda-edge` — aws
- [Amazon S3 Object Lambda](https://localhost:3000/catalogue/components/aws-s3-object-lambda.md) `aws-s3-object-lambda` — aws
- [AWS Transfer Family](https://localhost:3000/catalogue/components/aws-transfer-family.md) `aws-transfer-family` — aws
- [AWS Lambda](https://localhost:3000/catalogue/components/lambda.md) `lambda` — aws
- [Azure App Service](https://localhost:3000/catalogue/components/azure-app-service.md) `azure-app-service` — azure
- [Azure AI Bot Service](https://localhost:3000/catalogue/components/azure-bot-service.md) `azure-bot-service` — azure
- [Azure Container Apps](https://localhost:3000/catalogue/components/azure-container-apps.md) `azure-container-apps` — azure
- [Azure Container Instances](https://localhost:3000/catalogue/components/azure-container-instances.md) `azure-container-instances` — azure
- [Microsoft Copilot Studio](https://localhost:3000/catalogue/components/azure-copilot-studio.md) `azure-copilot-studio` — azure
- [Azure Functions](https://localhost:3000/catalogue/components/azure-functions.md) `azure-functions` — azure
- [Healthcare agent service](https://localhost:3000/catalogue/components/azure-health-bot.md) `azure-health-bot` — azure
- [Microsoft Power Apps](https://localhost:3000/catalogue/components/azure-power-apps.md) `azure-power-apps` — azure
- [Azure Spring Apps](https://localhost:3000/catalogue/components/azure-spring-apps.md) `azure-spring-apps` — azure
- [Dynamic Workers](https://localhost:3000/catalogue/components/cloudflare-dynamic-workers.md) `cloudflare-dynamic-workers` — cloudflare
- [Email Workers](https://localhost:3000/catalogue/components/cloudflare-email-workers.md) `cloudflare-email-workers` — cloudflare
- [Cloudflare Pages](https://localhost:3000/catalogue/components/cloudflare-pages.md) `cloudflare-pages` — cloudflare
- [Cloudflare Sandbox SDK](https://localhost:3000/catalogue/components/cloudflare-sandbox.md) `cloudflare-sandbox` — cloudflare
- [Cloudflare Workers](https://localhost:3000/catalogue/components/cloudflare-workers.md) `cloudflare-workers` — cloudflare
- [Workers for Platforms](https://localhost:3000/catalogue/components/cloudflare-workers-for-platforms.md) `cloudflare-workers-for-platforms` — cloudflare
- [Generic application server](https://localhost:3000/catalogue/components/app-server.md) `app-server` — default
- [AutoGen Studio](https://localhost:3000/catalogue/components/autogen-studio.md) `autogen-studio` — default
- [Botpress](https://localhost:3000/catalogue/components/botpress.md) `botpress` — default
- [Cloud Foundry](https://localhost:3000/catalogue/components/cloud-foundry.md) `cloud-foundry` — default
- [Container service](https://localhost:3000/catalogue/components/container-service.md) `container-service` — default
- [Coolify](https://localhost:3000/catalogue/components/coolify.md) `coolify` — default
- [CrewAI AMP](https://localhost:3000/catalogue/components/crewai-enterprise.md) `crewai-enterprise` — default
- [Dify](https://localhost:3000/catalogue/components/dify.md) `dify` — default
- [Docker container](https://localhost:3000/catalogue/components/docker-container.md) `docker-container` — default
- [Dokku](https://localhost:3000/catalogue/components/dokku.md) `dokku` — default
- and 58 more: https://localhost:3000/catalogue/kinds/app-server.md

## Use it in a design

```yaml
nodes:
  - { id: "google-cloud-functions", component: "google-cloud-functions" }
```

## Source (`component` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../../schema/component.schema.json
# Cloud Run functions (formerly Cloud Functions): a single function deployed on Cloud Run's serving
# infrastructure ("Cloud Run functions overview"). Deployment defaults are 256 MB of memory, a
# 60-second timeout, min instances 0, ingress `all` and security level secure-always so only HTTPS is
# served; max instances default to no limit for 2nd gen and HTTP functions ("gcloud functions deploy").
schemaVersion: "1"
type: "component"
id: "google-cloud-functions"
kind: "app-server"
provider: "gcp"
docs: "https://cloud.google.com/sdk/gcloud/reference/functions/deploy"
aliases: ["GCF"]
defaults:
  managed: true
  stateless: true
  autoscaling: true
properties:
  # What invokes the function: an HTTP request or an event trigger delivered through Eventarc
  # ("Cloud Run functions triggers"). No default.
  trigger:
    type: "enum"
    values: ["http", "pubsub", "storage", "firestore", "eventarc", "schedule"]
  memoryMb:
    type: "integer"
    default: 256
  timeoutSeconds:
    type: "integer"
    default: 60
  minInstances:
    type: "integer"
    default: 0
  maxInstances:
    type: "integer"
    default: 0
  ingressSettings:
    type: "enum"
    values: ["all", "internal-only", "internal-and-cloud-load-balancing"]
    default: "all"
  httpsOnly:
    type: "boolean"
    default: true
```

Human page: https://localhost:3000/catalogue/components/google-cloud-functions
