← Back to microservices patterns mapdeploy
🏗️
Microservices Pattern
Immutable Infrastructure
Never patch running instances; build a new image and replace them.
Detailed Description
Immutable infrastructure makes production match the artifact built and tested in CI.
Rollback means redeploying a known previous image, not manually undoing server changes.
Avoid SSH patching or manual hotfix drift on running hosts; replace nodes/images instead.
Pair with GitOps or declarative deployment pipelines so desired state and runtime state stay aligned.
Treat runtime as disposable: build once, promote through environments, and replace predictably.
Visual Diagram
Bad: patch live server Good: build image v2 Deploy replacement Terminate old
Tradeoffs
Pros
Predictable deployments, no configuration drift
Cons
Requires strong build and release pipeline
Examples: Docker, Kubernetes, Packer AMIs, GitOps with ArgoCD
Exact HTML content was not provided for this deployment pattern.