Resources / Process

Process

A program running as a process: woken by frames on its virtual Ethernet interfaces, by timers it sets and by schedules declared here, idle (and free) in between.

Overview

APIcompute.etorm.com/v1alpha1
Resourceprocesses (cluster-scoped inside its cluster)
Short namesproc
Available inproject clusters only
Statuswritten by a controller through /status

Minimal example

apiVersion: compute.etorm.com/v1alpha1
kind: Process
metadata:
  name: example
spec:
  programRef:
    name: "<name>"

Spec

FieldTypeRequiredDefaultAllowedDescription
programRefreference to ProgramyesThe program to run; it must be Ready. Point it at another program to roll out a new version.
desiredStatestring (one of)"Running"Running, Suspended, Stopped, HibernatedRunning; Suspended keeps the state and interfaces but delivers nothing; Stopped deletes the state; Hibernated writes a snapshot of the process (memory included) to the hibernation bucket and releases it, and Running later continues it from there, on any machine that reaches its VPCs (needs spec.hibernation).
monitoringRefreference to MonitoringWorkspaceOptional MonitoringWorkspace to send process logs and fuel/CPU metrics to.
interfaceslist of objectup to 8 itemsVirtual Ethernet interfaces, each a port on a VPC. At most 8.
interfaces[].namestringyeslength 1 to 63Interface name, unique in the process (a DNS label).
interfaces[].vpcRefreference to VPCyesThe VPC this interface is a port on.
interfaces[].mtuinteger576 to 1500Largest payload of a frame; defaults to the VPC's and is capped by it.
configobjectSettings the program reads by key. Not secret. At most 64 entries and 16 KiB in total.
resourcesobject{}How much the process may use.
resources.cpuShareinteger101 to 100Relative share when processes compete for the same processor, on top of the allowance in cpuMillicores.
resources.memoryPowerinteger40 to 12Memory the process may use, as a power of two of 64 KiB: 0 is 64 KiB, 1 is 128 KiB, 2 is 256 KiB, 3 is 512 KiB, 4 is 1 MiB (the default), and so on up to 12, which is 256 MiB, the most any process may have (no one is exempt). A program that needs more at start-up is refused; one that grows past it fails.
resources.cpuMillicoresinteger1001 to 1000Processor time the process may use on average, in thousandths of one core: 100 is a tenth of a core (the default), 1000 a whole core. Short bursts above it are allowed; work beyond the allowance waits.
resources.stateMaxBytesinteger655360 to 1048576Largest durable state the program may keep, in bytes.
resources.maxCpuMillicoresinteger1 to 1000The most cpuMillicores an automatic remediation may raise this process to when it runs out of fuel (spec 0020 'Remediation'). Unset: one core.
scheduleslist of objectup to 8 itemsTimes at which the process is woken by itself, with no frame involved. At most 8.
schedules[].namestringyeslength 1 to 63Schedule name, unique in the process; passed to the program when it ticks.
schedules[].cronstringup to 100 charactersFive fields in UTC: minute hour day-of-month month day-of-week; lists, ranges and steps. Exactly one of cron and everySeconds.
schedules[].everySecondsinteger1 to 86400Fixed interval in seconds, counted from startsAt. Exactly one of cron and everySeconds.
schedules[].startsAtstringRFC 3339 time the interval is counted from; defaults to the creation time.
placementobject{}Where the process lives.
placement.regionstring"auto"up to 32 charactersauto (next to its VPCs) or a region such as eu, us or apac.
placement.affinityGroupstringup to 63 charactersAffinity: processes of one project with the same group run on the same node. The first member is claimed by any node; the others only by the node that holds a member. A node that lost its members releases them all, and the group starts again.
placement.spreadGroupstringup to 63 charactersAnti-affinity: processes of one project with the same group never run on the same node (the nodes of one Ingress run on different stations). A process waits (NoNode) while every node holds a member of its group.
placement.hoststringup to 63 charactersPlatform processes only: the one machine (the name of a node or a gateway) that may host the process. Set by the placement controller (spec 0047 section 4); a machine with another name leaves the process alone.
egresslist of objectup to 16 itemsPlatform processes only: the HTTPS hosts the program may call with the host function http (spec 0021 'Calling out'). Nothing else is reachable from the program.
egress[].hoststringyeslength 3 to 253A DNS name, for example api.example.com, or *.example.com for every name under example.com. Never an address.
egress[].portinteger4431 to 65535The port.
restartRequestedAtstringup to 40 charactersRFC 3339 time. Set it to now to restart the process: a machine that hosts it starts a new life of it when this value changes (a process that is Failed and waiting for its backoff starts at once). A remediation does this for a failing process.
restartPolicystring (one of)"Always"Always, OnFailure, NeverWhether a process that failed five times in a row is started again after a backoff.
residencystring (one of)"Ephemeral"Ephemeral, ResidentEphemeral: a fresh instance for every wake-up. Resident: the instance and its memory stay between wake-ups (for programs that hold connections); a failure or a restart begins it again.
wakeobject{}How a sleeping (hibernated) process is woken. A magic frame (Wake-on-LAN, EtherType 0x0842 or UDP port 7 or 9 over IPv6) addressed to the process's MAC on its VPC wakes it, and so does a neighbor solicitation for its address; a wake request here or a timer does too.
wake.modestring (one of)"lan"lan, nonelan: frames and neighbor solicitations on the VPC wake it. none: only a wake request, a timer or desiredState wake it.
wake.maxPerHourinteger601 to 3600At most this many wakes in any hour; more are ignored and counted.
wake.minIntervalSecondsinteger51 to 3600At least this many seconds between two wakes; closer ones are ignored and counted.
wake.addresseslist of stringup to 8 itemsExtra IPv6 addresses answered for while it sleeps (its link-local and SLAAC addresses always are); a program that picks other addresses lists them here.
wake.requestedAtstringup to 40 charactersRFC 3339 time. Set it to now to wake the process; a value newer than status.wake.lastAt wakes it.
billingobjectPlatform processes only: who pays for the CPU this process uses. Set by the platform when it creates the process; it cannot be changed.
billing.ownerobjectThe customer's resource this process works for: its project, kind and name. Its CPU time (queries and housekeeping) is billed to that project's billing account.
billing.owner.projectstringup to 63 charactersThe owner's project.
billing.owner.workspacestringup to 63 charactersAnother word for project (spec 0034); stored as project.
billing.owner.kindstringlength 1 to 63The owner's kind, for example Database.
billing.owner.namestringlength 1 to 63The owner's name.
hibernationobjectWhere and when a resident process is snapshotted so that it can be hibernated, moved, or continued after a machine is lost. Requires residency Resident.
hibernation.bucketRefobjectyesThe Storage bucket of this project that holds the snapshots. It is also made available to the program, like an entry of buckets.
hibernation.bucketRef.namestringyeslength 1 to 63Name of the bucket.
hibernation.checkpointEverySecondsinteger00 to 86400While running, take a snapshot this often when something changed, so a lost machine costs at most this much progress. 0 (the default) takes none; otherwise 10 to 86400.
hibernation.idleAfterSecondsinteger00 to 86400Hibernate by itself after this many seconds without an activation, and wake on a frame, a neighbor solicitation, a timer or a request. 0 (the default) never; otherwise 30 to 86400.
secretslist of objectup to 32 itemsSecrets delivered to the program inside its sandbox (spec 0039 section 11, spec 0021 'Secrets'). The values are never visible in this object, in the process's configuration, its logs or its snapshots' metadata.
secrets[].secretRefobjectyesThe secret, a Secret of this project.
secrets[].secretRef.namestringyeslength 1 to 63Name of the secret.
secrets[].keyslist of stringup to 32 itemsOnly these keys of the secret; empty means all.
secrets[].asobjectyesHow the program receives it. Only host is available: the program reads a key with the host function secret(name, key). A program is a core WebAssembly module, so there is no environment or file to put a value in.
secrets[].as.hostobjectDeliver through the host function secret.
bucketslist of objectup to 4 itemsStorage buckets of this project the program may read and write. Nothing else is reachable.
buckets[].namestringyeslength 1 to 63Name of the bucket.

Status

FieldTypeRequiredDefaultAllowedDescription
phasestringPending (waiting for a node), Ready (placed; also when idle), Suspended, Hibernated (a snapshot is saved and no machine holds it), Stopped or Failed.
memorystringThe memory allowance, for example 64 KiB or 1 MiB.
cpustringThe processor allowance, for example 100m for a tenth of a core.
nodestringWhere it runs.
nodeHintstringThe node an affinity group of this process lives on; only that node claims it (set by the controller).
lastSeenintegerUnix timestamp (seconds) of the last status report from the hosting node.
nextWakestringWhen a timer or schedule will next wake it (RFC 3339); absent if only frames can.
interfaceslist of objectThe interfaces with the addresses allocated to them.
interfaces[].namestringInterface name.
interfaces[].vpcstringVPC it is a port on.
interfaces[].vpcProjectstringThe project that owns the VPC, when it is not this process's own.
interfaces[].macAddressstringAllocated Ethernet address; the program can send only frames from it.
interfaces[].linkLocalAddressstringIPv6 link-local address derived from the MAC.
interfaces[].ipv6AddressstringThe address SLAAC derives from the MAC in the VPC prefix; the program may use any address.
interfaces[].mtuintegerEffective MTU.
reportedobjectValues the program itself reports about its state (for example which backends it sees as healthy), as text: at most 4 KiB in all, the last values written. The program sets them; the platform only carries them here.
snapshotobjectThe latest snapshot saved in the hibernation bucket.
snapshot.generationintegerIts number; every snapshot is a new, higher one.
snapshot.takenAtstringWhen it was taken (RFC 3339).
snapshot.bytesintegerIts size in bytes.
snapshot.memoryPagesintegerMemory it holds, in pages of 64 KiB.
snapshot.nodestringThe machine that wrote it.
snapshot.reasonstringWhy it was taken: Hibernated or Checkpoint.
sleepingbooleanTrue while the process sleeps by itself (it went idle) and no machine holds it.
placementobjectController-verified placement of the process (used for placement-scoped storage credentials, spec 0027).
placement.nodestringThe node currently holding this process, when placed.
wakeobjectThe last wake of a sleeping process and what has been ignored.
wake.lastAtstringWhen it was last woken (RFC 3339).
wake.sourcestringWhat woke it: frame, udp, ndp, api, timer or schedule.
wake.countintegerWakes so far.
wake.ignoredintegerWake attempts that were not acted on.
wake.lastIgnoredstringWhy the last one was ignored: Running, Parked, RateLimited or Disabled.
restoredFromobjectThe snapshot the running life continued from, if it did.
restoredFrom.generationintegerThe snapshot's number.
restoredFrom.atstringWhen it continued (RFC 3339).
restoredFrom.reasonstringResumed (same machine) or Moved (another machine).
snapshotIssueobjectA problem with snapshots, reported by the machine: CheckpointFailing (a snapshot could not be saved; the process keeps running), SnapshotRefused (the saved snapshot could not be used; it started afresh) or Fenced (another machine took the process over).
snapshotIssue.reasonstringMachine-readable reason.
snapshotIssue.messagestringHuman-readable detail.
usageobject (free-form)What the process used: activations, failures, fuel, frames in and out, frames dropped, last error, and failed (true while it has failed repeatedly and waits to restart).
logslist of objectThe last log lines the program wrote.
conditionslist of objectDetailed state, one entry per aspect; Ready says whether the process is running.
conditions[].typestringAspect.
conditions[].statusstringTrue or False.
conditions[].reasonstringMachine-readable reason.
conditions[].messagestringHuman-readable detail.
conditions[].lastTransitionTimestringWhen the status last changed (RFC 3339).
conditions[].observedGenerationintegerThe generation of the process the condition was computed for.
conditions[].remediationobject (free-form)What may be done about a condition that is not as desired: Wait, Automatic (names the remediation), Incident or None (spec 0047 section 2).

Columns in listings

ColumnFrom
Program.spec.programRef.name
Desired.spec.desiredState
Memory.status.memory
CPU.status.cpu
Region.spec.placement.region
Phase.status.phase
Next wake.status.nextWake

Related guides

All resources