What root-device to use for a new EC2 instance?
Asked Answered
B

3

9

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?

Boxcar answered 21/12, 2010 at 14:38 Comment(0)
H
3

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."

Heptameter answered 26/12, 2010 at 22:1 Comment(3)
Also take a look at: #3631006Heptameter
Looks good. Another quick question - when using an EBS-backed instance, where is my Database located? Is it also located on the (same?) EBS volume? If so, how does that work in terms of scaling, i.e. if I want to add more servers in order to scale?Boxcar
I only use Windows images, but I imagine this comment will be the same for your Ubuntu images... If you create a Windows + SQL server image then both the machine and the SQL database run off the same EBS volume. Now EBS is just disk storage, so if you need scalability then you would create another EBS volume and make the database run off that. That would give you an independent image and database volume. But if you need real scalability then look at Amazon RDS -- it's a manage and scalable MySql deployment that may be more suitable for your needs.Heptameter
L
6

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.

Lublin answered 22/12, 2010 at 0:41 Comment(0)
H
3

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."

Heptameter answered 26/12, 2010 at 22:1 Comment(3)
Also take a look at: #3631006Heptameter
Looks good. Another quick question - when using an EBS-backed instance, where is my Database located? Is it also located on the (same?) EBS volume? If so, how does that work in terms of scaling, i.e. if I want to add more servers in order to scale?Boxcar
I only use Windows images, but I imagine this comment will be the same for your Ubuntu images... If you create a Windows + SQL server image then both the machine and the SQL database run off the same EBS volume. Now EBS is just disk storage, so if you need scalability then you would create another EBS volume and make the database run off that. That would give you an independent image and database volume. But if you need real scalability then look at Amazon RDS -- it's a manage and scalable MySql deployment that may be more suitable for your needs.Heptameter
M
0

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.

Masters answered 22/12, 2010 at 0:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.