Home/Glossary/Immutable Infrastructure

Immutable Infrastructure

An infrastructure paradigm where servers are never modified after deployment; changes require replacing instances with new ones built from updated images.

DevSecOpsAlso called: "immutable servers", "phoenix servers"

Immutable infrastructure treats servers as disposable, replacing rather than patching them, which improves security and reliability.

Core principle Instead of updating running servers (mutable), you:

  1. Build a new image with updates.
  2. Deploy new instances from the image.
  3. Route traffic to new instances.
  4. Terminate old instances.

Security benefits

  • No configuration drift: Servers match their defined state.
  • Reduced attack surface: No SSH access needed in production.
  • Easier forensics: Compare running image to golden image.
  • Faster recovery: Replace compromised instances immediately.
  • Consistent patching: Updates apply uniformly.

Implementation patterns

  • AMIs/Images: Bake applications into machine images.
  • Containers: Package apps in immutable container images.
  • Serverless: Functions are inherently immutable.
  • GitOps: Infrastructure changes through version control.

Related practices

  • Infrastructure as Code (Terraform, CloudFormation).
  • CI/CD pipelines for image building.
  • Blue-green or canary deployments.
  • Container orchestration (Kubernetes).

Challenges

  • Longer deployment times (image building).
  • Stateful applications require separate data stores.
  • Debugging requires centralized logging.
  • Initial learning curve for teams.

Zero Trust alignment Immutable infrastructure supports Zero Trust by ensuring systems are always in a known, verified state.