Unisrv logoUnisrv.io
Service Primitives

Instances

One running container on one node.

An instance is one container on one node. Deployments create and replace them for you, or you start one yourself for a migration, a script or a quick check that an image boots.

Isolation

On bare metal with KVM, each instance gets its own Firecracker microVM and guest kernel. Strong enough for sandboxes and untrusted code. On a cheap VPS or a VM inside a public cloud there's no KVM to use, so instances run as regular containers. Your config doesn't change.

The same two instances on two kinds of node. On bare metal with KVM, each runs in its own Firecracker microVM with its own guest kernel. On a VPS or cloud VM, they run as containers sharing the host kernel.

Lifecycle

An instance starts provisioning, then runs. It ends either exited, after a clean or requested stop, or failed, when it couldn’t start or exited non-zero. Only failed counts toward the deployment's backoff.

Only Failed counts toward a deployment's backoff.

Things to know

  • Instances don't move. Placement happens once. Moving means a new instance replaces it.
  • Standalone instances aren't managed. One you start yourself, from the web console or with unisrv instance run, won't come back if it dies, and unisrv up leaves it alone.
  • The filesystem is scratch. Mount a volume for anything that must outlive the instance.
  • Platform variables are set for you. Every instance gets UNISRV_INSTANCE_ID, UNISRV_INSTANCE_NAME and UNISRV_NODE_ID. Deployment instances also get UNISRV_DEPLOYMENT_ID and UNISRV_DEPLOYMENT_NAME. They override your own variables of the same name.

On this page