

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: EC2 Instance Configuration: Keys
incomplete
2: EC2 Instances
incomplete
3: AMIs and Instance Types
incomplete
4: Public IPs
incomplete
5: Elastic IPs
incomplete
6: Security Groups
incomplete
7: SSH to Our Server
incomplete
8: Deploy the PatientPing Site
incomplete
9: Open Web Traffic
incomplete
10: Creating and Using Your Own AMI
incomplete
11: Reserved Instances and Savings Plans
incomplete
12: Auto Scaling Groups
incomplete
13: Launch Template
incomplete
14: Launch from Template
incomplete
15: Spot Instances
incomplete
16: Stateful and Stateless Applications
incomplete
17: Optional Cleanup
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Servers should be treated like cattle, not pets.
– Abraham Lincoln (probably)
Cattle are raised by the rancher for a functional purpose, whereas pets are adored, named, and become a part of the family they reside in.
What does it mean to treat servers like cattle? It means we describe the kinds of resources we need and how many, then let specific instances be created and destroyed automatically as needed. We should not feel emotionally attached to a particular VM.
In AWS, ASGs and Launch Templates allow this. When a server fails, there is no need to patch it, nurse it back to health, or come up with clever names for it. It served its purpose and can be replaced by a new server.
However, your application needs to be designed for this. If your app server holds critical customer data, or data that can't be recreated, deleting that server would be very unfortunate.
That's why many backend developers like to write stateless applications. All the critical bits of our app are stored in a separate stateful database, but the compute servers (usually HTTP/REST/JSON servers) can be created and destroyed as needed.