Docs

Daemon behavior and limits

How a Daemon is placed and run on each platform, and the limits Alien enforces.

Placement

A Daemon runs one instance on every eligible machine. With .pool(), only machines of that pool are eligible.

On AWS, Google Cloud, and Azure, a Daemon must name its ComputeCluster with .cluster(). A deployment without one fails. Unlike Containers, a Daemon doesn't fall back to a default cluster.

Platforms

AWS, Google Cloud, and Azure

One instance per machine of the cluster or pool. .runtime() is applied. Each instance gets the cluster topology variables.

Kubernetes

A DaemonSet with restartPolicy: Always.

  • .cluster() and .pool() select the node pool, and the DaemonSet gets that pool's node selector.
  • Resource requests come from the min of cpu and memory, and limits from desired.
  • .stopGracePeriod() sets the pod's termination grace period.
  • .runtime() is not applied. Privileged mode, host namespaces, the user, and host mounts are ignored.

Local

A supervised local process from the image. The health check runs every 5 seconds. .runtime() is not applied.

Machines

One instance per joined host.

Public endpoints

  • HTTP only.
  • All public endpoints route to the same backend port.
  • Public endpoints can't change after create. Changing them replaces the resource.
  • On Machines, a Daemon with public endpoints needs runtime.networkMode: "host" and must serve HTTPS on port 443 of the host itself. Without host networking, the build fails with MACHINES_DAEMON_PUBLIC_ENDPOINT.

Runtime validation

Alien refuses a .runtime() that breaks these rules:

FieldRule
pidNamespacehost or private
networkModehost or appnet
userNumeric uid, or uid:gid
mounts[].source, mounts[].targetAbsolute paths

Limits

LimitValue
Instances1 per eligible machine
Public endpoint protocolHTTP
Public backend ports1
Stop grace period1 to 86,400 seconds
Health check timeout1 to 5 seconds
IdLowercase letters, digits, and hyphens

On this page