Disposable application instances
coreintermediateA disposable instance can be killed and replaced at any moment without losing anything important — because nothing important lives only on that instance. This is what makes auto-scaling, rolling deploys and crash recovery all simple: killing an instance is a routine event, not an emergency.
Think of it as
Think of a disposable instance like a rental car rather than a personal vehicle. You do not keep anything irreplaceable in a rental car, because you might swap it for a different one tomorrow. An application instance built the same way — no irreplaceable data living only there — can be swapped, restarted, or terminated without anyone needing to plan around it.
What we're doing: Show an auto-scaling group only working safely because its instances are disposable.
- 8
- Both directions of auto-scaling — adding and removing — assume disposability.
- 11
- This is the actual mechanism: identical boot, no unique setup, so scaling up needs no manual step.
Why this works: Auto-scaling terminates instances routinely as part of normal operation — a design that is not disposability-safe will lose data every time the scaler shrinks the pool.
Writing uploaded files to an instance's local disk
Wrong
Better
What you see: An uploaded file "disappears" the next time a user's request happens to land on a different instance, or entirely when the instance that received the upload is later terminated by the auto-scaler.
Why: Local disk is exactly the kind of unique, unreplicated state that makes an instance non-disposable. Moving it to shared, durable storage (object storage, a database) is what restores disposability.
- Disposable
- No data lives only on this instance
- Crash → auto-restart, no incident
- Enables auto-scaling and rolling deploys
- "Pet"
- Has unique, hand-configured local state
- Crash → paged, manual recovery
- Cannot be freely killed and replaced
Disposable vs "pet" instances
Together
Remember: A disposable instance holds no unique state and can be killed and replaced at any time — the precondition for auto-scaling, rolling deploys and self-healing crash recovery.
See also: moving state out · stateless servers and scaling

