Cloud deployment options
Node.js can run on a virtual machine, managed container service, Kubernetes, or a function platform. Choose the host by workload needs, not by the number of services it offers. A VM offers operating-system control but needs patching and supervision. Managed application platforms reduce host operations but may constrain ports, timeouts, filesystem persistence and supported runtimes. Functions often suit bounded request or event work; persistent connections and long background jobs require verified host capabilities. Separate durable storage from ephemeral instances, and plan workload identity, observability and rollback. Exact provider limits and prices are not verified here. Do not assume a filesystem write survives instance replacement or every Node core module is available on an edge runtime. Sources: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/.
Formal Syntax & Structure
Compare fictional host constraints (conceptual contract; see example)Working Example
import assert from 'node:assert/strict';const hosts=[{name:'function-model',maxSeconds:30,sockets:false},{name:'container-model',maxSeconds:600,sockets:true}];const suitable=hosts.filter(h=>h.sockets&&h.maxSeconds>=120).map(h=>h.name);assert.deepEqual(suitable,['container-model']);console.log(suitable[0]);