We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
This idea carries a full system design question on its own. Each walks through the full answer.
System Design Masterclass · Reliability Resilience
Free preview: the first 2 parts of this 8-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Reliability Resilience
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
In 2012, a startup ran their entire product on a single EC2 instance that an early engineer had configured by hand two years earlier. Nobody knew every package installed on it, every config file tweaked, every cron job added during a late night debugging session. When the instance died, they spent three days trying to recreate it from memory. They lost customers. They nearly lost the company.
This is the snowflake server problem. Any server that lives long enough accumulates changes that diverge it from any documented baseline. Patches, hotfixes, one-off debugging artifacts, security tweaks applied at 3am and never recorded. After a few months, the server is unique in ways that nobody fully understands.
Immutable infrastructure solves this by refusing to modify servers after they launch. Need a change? Build a new image, launch new instances, terminate the old ones. The fleet renews itself. Every running server traces back to a specific version in the image registry.
The traditional ops model treats servers like pets. You name them, you nurse them back to health when they get sick, you upgrade them in place. The immutable model treats servers like cattle. They have numbers, not names. When one is sick, you replace it.
Netflix pioneered this at scale starting in 2011. Their Chaos Monkey randomly terminates production instances to prove the fleet can absorb the loss. If a service cannot survive random instance death, the service has a design flaw.
| Aspect | Mutable (Pets) | Immutable (Cattle) |
|---|---|---|
| Updates | SSH in, patch in place | Build new image, replace instances |
| Drift | Inevitable over time | Impossible by design |
| Rollback | Undo the patch (if you remember it) | Repoint to the previous image tag |
| Security incident | Clean the server, hope you got everything | Terminate the server, launch fresh from verified image |
| Debugging | Log into production | Snapshot the instance, debug offline |
| Reproducibility | Only if you documented every step | Every instance is identical by construction |
The core trade-off: you spend more time building image pipelines up front, but you eliminate an entire class of production incidents caused by configuration drift.