问题
I'm trying to get started with Amazon's EC2.
I have to choose an image (AMI) to start with. I've settled on using the official Ubuntu AMI, but I have two options for the root store - "instant" or "ebs". (See this page).
Being new to AWS, I'm not sure I really understand the difference. What do the two options mean, and what are the pros/cons of each?
回答1:
I recommend EBS, but it really depends on your scenario. Our company uses EBS specifically for the following reasons (ripped off from http://LabSlice.com/FAQ at the bottom):
"The EBS-backed machines are faster to load, can be stopped and can be taken a snapshot of in a matter of minutes. They support the newer Micro instances sizes (only 2 cents/hr) and in many cases will be of lower cost to run for typical LabSlice usage profiles. All these benefits made us decide to support only the EBS-backed AMIs."
回答2:
EBS (Elastic Block Store) means that there is an abstraction of a hard drive available for the root of your instance. If your instance terminates then everything is still there.
If you use the instance store then the contents of your root directory are stored in the image on S3. This means that, if the instance terminates, then all the information in the root directory goes away.
I've been using a (now very old) Ubuntu instance using the instance store and it's not a problem. The data I really want to persist through reboots is stored on EBS volumes which are mounted into root (in this case, this is database data and app server applications and logs).
The issue becomes what happens if you need two of the same instance and need your pool of instances to grow and shrink based on demand. If you were using an EBS root store then you would need to copy the EBS data before starting the second instance. With an instance root store you can just start it.
回答3:
I'm not an expert, but I'd recommend the EBS-backed AMI. It's easier to have your changes persist across crashes/terminations.
Amazon's guide to instant/S3 vs. EBS-backed is here.
来源:https://stackoverflow.com/questions/4500374/what-root-device-to-use-for-a-new-ec2-instance