.NET Architecture & System Design Interview Question #186

What is immutable infrastructure?

Deployment, Cloud Operations, SRE & Senior System Design Scenarios Senior Advanced

Quick Interview Answer

Immutable infrastructure replaces deployed instances with newly built instances instead of modifying them manually in place.

Detailed Explanation

Immutable infrastructure replaces deployed instances with newly built instances instead of modifying them manually in place.

This reduces configuration drift and makes deployments more reproducible. State that must survive replacement is stored in appropriate external systems such as databases, object storage, or durable volumes.

Code Example

Old image: app:v1
      |
do not patch server manually
      |
Build app:v2
      |
replace instances