Cloud Run functions
Single function deployed on Cloud Run's serving infrastructure, scaling from zero.
- Provider
- gcp
- Category
- Compute
- Also known as
- GCF
| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| autoscaling | boolean | — | no | false | ▸ true |
| criticality | 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 | 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 | boolean | — | no | true | inherited |
| runtime | string | — | no | — | inherited |
| shardingStrategy | enum | none | consistent-hash | range | lookup | no | none | inherited |
| singleWriter | boolean | — | no | false | inherited |
| stateless | boolean | — | no | true | ▸ true |
| timeoutSeconds | integer | — | no | 60 | inherited |
| trigger | enum | http | pubsub | storage | firestore | eventarc | schedule | no | — | inherited |
Every rule whose selector covers this component's kind or its category. Whether a rule fires depends on the design: its properties, its edges and its groups.
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.
- — 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
Calling a worker synchronously puts the background job on the request path. The caller waits for the slowest part of the fan-out.
- — the node has at least one synchronous outgoing edge to a worker
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.
- — 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
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.
- — 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
nodes:
- { id: "cloud-functions", component: "google-cloud-functions" }# 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