Skip to content

CONCEPT Cited by 1 source

Container ephemerality

Container ephemerality is the operational-semantics property that a container instance's filesystem state is not durable past the container's lifetime — deletion, replacement, eviction, migration, or scale-down destroys anything written inside the container. It's a deliberate platform-design choice for multi-tenant container tiers: it makes scheduling, bin-packing, and upgrades much simpler, at the cost of forcing every stateful workload to externalise its state.

Platform-design consequence

Ephemerality turns "I need to persist session state / cache / uploaded files" from an implementation detail inside the container into an architectural decision: the stateful bits must live in an external durable tier (object storage, database, KV, queue) that is mounted or called by the container rather than stored inside it.

Cloudflare Containers are documented as ephemeral by design; analogous properties hold for AWS Fargate tasks, Lambda execution environments, Kubernetes emptyDir volumes, and any "cattle not pets" containerised runtime. The problem shape is universal — what varies is the platform's answer for the bolt-on durability layer.

Solution shape: mountable persistent storage

The ergonomic answer is a primitive that presents an external durable store (object storage, network filesystem) as a local filesystem mount inside the ephemeral container — so application code sees a normal directory and doesn't need a storage-API rewrite. See patterns/mountable-persistent-storage.

Contrast with stateless-by-contract compute

Related to but distinct from concepts/stateless-compute: a stateless-by-contract runtime (e.g. Lambda's launch tenet) tells the application not to hold state; container ephemerality is the platform property that enforces this by wiping state whether or not the application cooperates. A stateful containerised agent (like Moltbot) wants local state — ephemerality forces the platform to give it a compliant escape hatch.

Seen in

Last updated · 200 distilled / 1,178 read