Immutable Infrastructure
Never patch a running server — replace it with a freshly built one. No config drift, easy rollback.
Immutable infrastructure is the practice of never modifying a running server after it is deployed: to change anything, you build a new machine image and replace the old instances entirely. Servers are treated as disposable — “cattle, not pets.”
Worked example: to ship an update you bake a new image with the change, roll out fresh instances from it, and terminate the old ones — a bad release rolls back by simply redeploying the previous image. Gotcha: it eliminates configuration drift (no more “this one server is subtly different because someone SSHed in and fixed it”) and makes rollbacks trivial, but it requires stateless servers and externalized state — anything stored on the box is lost when it is replaced, which forces good stateless design.