DigitalOcean Functions
On-demand serverless functions invoked over HTTP, on a schedule or asynchronously.
- Provider
- digitalocean
- Kind
- Worker
- Category
- Compute
- Official docs
- https://docs.digitalocean.com/products/functions/
| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| accelerator | enum | none | gpu | asic | no | none | inherited |
| concurrency | integer | — | no | — | ▸ 120 |
| fanoutStrategy | enum | none | push | pull | hybrid | no | none | inherited |
| fanoutThreshold | integer | — | no | — | inherited |
| idempotent | boolean | — | no | false | inherited |
| instances | integer | — | no | — | inherited |
| invocationsPerMinute | integer | — | no | 600 | inherited |
| managed | boolean | — | no | false | ▸ true |
| maxTimeoutMinutes | integer | — | no | 15 | inherited |
| memoryMb | integer | — | no | 256 | inherited |
| rateControl | enum | none | fixed | aimd | no | none | inherited |
| runtime | enum | go | node | php | python | no | — | inherited |
| schedule | string | — | no | — | inherited |
| trigger | enum | queue | stream | schedule | batch | manual | yes | — | ▸ manual |
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.
Pure push fan-out over a social graph is brutal at the tail: one post from an account with millions of followers becomes millions of cache writes. A follower threshold above which readers merge at read time bounds that write amplification.
- — all of these hold:
- — the node's `fanoutStrategy` is "push"
- — the node's `fanoutThreshold` has no value
- — the design contains a node of kind graph-database
One worker pool consuming several queues lets a slow or poisoned queue starve the others. That is precisely what the design's per-queue isolation requirement forbids.
- — all of these hold:
- — the node has more than 1 incoming edge from a queue
- — the design requirement `isolation.perQueue` is true
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: "functions", component: "digitalocean-functions" }# yaml-language-server: $schema=../../schema/component.schema.json # DigitalOcean Functions: "blocks of code that run on demand without the need to manage any # infrastructure", deployed into a namespace and invoked over HTTP, on a schedule or # asynchronously ("Functions"). "Functions Limits": memory defaults to 256 MB within a # 128 MB - 1 GB range, the maximum timeout is 15 minutes including initialization, and a # namespace runs up to 120 concurrent functions at up to 600 invocations per minute. schemaVersion: "1" type: "component" id: "digitalocean-functions" kind: "worker" provider: "digitalocean" docs: "https://docs.digitalocean.com/products/functions/" defaults: managed: true trigger: "manual" concurrency: 120 properties: runtime: type: "enum" values: ["go", "node", "php", "python"] memoryMb: type: "integer" default: 256 maxTimeoutMinutes: type: "integer" default: 15 invocationsPerMinute: type: "integer" default: 600