Definition: Worker
A worker is a KERNSTACK container process for work that outlives a single request — a Go binary or a Node.js, Python, or PHP runtime — declared under resources.workers with its own HTTP port, memory and CPU sizing, idle timeout, and instance limits.
When code is a worker
Duration and language decide. Transcoding, imports, report generation, queue draining, your own HTTP server — anything measured in minutes or written outside Go — is a worker. Workers expose themselves through http gateway routes ({ "kind": "worker" }), receive workflow steps, and mount bucket volumes when large files must look like a filesystem.
Sizing and idling, declared
A worker declares memory_mb and cpu_cores (default 512 MiB and 2 cores, up to 1024 MiB and 8), an invoke_timeout_ms, and its idle behaviour: idle_timeout_ms stops an instance after quiet, and min_instances: 0 means scale to zero. Warm instances are a declared choice with a visible meter, not a default you pay for unknowingly.
Frequently asked questions
binary (a compiled Go program, the default), nodejs, python, and php. The runtime is a field on the worker declaration; buildpacks and proprietary process types do not exist in this model.
Yes. Give it an http_port and an http gateway route targeting the worker. Websocket routes are the exception — they must target functions.
Only if you declare min_instances above zero. With min_instances: 0 and an idle timeout, instances stop when quiet and the project pays storage, not standing compute.
Related capabilities, architectures, and comparisons
Ship your stack on the Software Lifecycle Cloud.
Closed preview on dedicated European infrastructure. Bring a repository or start from a blueprint.