Immutable infrastructure is a deployment pattern where servers, containers, or disks are never modified after creation. Updates replace the entire artifact instead of patching running instances.
Immutable infrastructure means once an instance is built, it is never changed. Deployments create new instances from the same artifact and retire old ones. Configuration drift, in-place patches, and runtime mutations are avoided by design.
That replacement model removes the snowflake server problem where every machine slowly diverges from its original state. With immutable infrastructure, every instance is reproducible from a known artifact, which makes testing, rollback, and auditing predictable. The cost is higher artifact churn and longer bootstrap times for large images.
Think of it like this. Think of disposable cameras at a wedding. You do not modify them between shots. You take a photo, set the camera aside, and use a fresh one for the next moment.
Build pipelines produce versioned machine images or container images. Deployments provision new instances from those images and route traffic to them. Old instances are drained and terminated after health checks pass. Configuration management tools bake state into images instead of mutating live systems.
"Containers are always immutable." Containers can be mutable if teams exec into them and apply fixes. "Immutable means no configuration." Configuration belongs in images, environment injection, or external stores; runtime edits are still mutable. "Immutable is always cheaper." Image rebuild and rollout frequency can increase storage and network cost.
Predictable deployments and clean rollbacks, but rebuild frequency and image management add operational overhead. Best paired with fast provisioning, image versioning, and infrastructure automation.