Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EBS for storing databases vs. website files

I spent the day experimenting with AWS for the first time. I've got an EC2 instance running and I mounted an Elastic Block Store (EBS) to keep the MySQL databases.

Does it make sense to also put my web application files on the EBS, or should I just deploy them to the normal EC2 file system?

like image 687
ryonlife Avatar asked Mar 15 '09 03:03

ryonlife


Video Answer


1 Answers

When you say your web application files, I'm not sure what exactly you are referring to.

If you are referring to your deployed code, it probably doesn't make sense to use EBS. What you want to do is create an AMI with your prerequisites, then have a script to create an instance of that AMI and deploy your latest code. I highly recommend you automate and test this process as it's easy to forget about some setting you have to manually change somewhere.

If you are storing data files, that are modified by the running application, EBS may make sense. If this is something like user-uploaded images or similar, you will likely find that S3 gives you a much simpler model.

EBS would be good for: databases, lucene indexes, file based CMS, SVN repository, or anything similar to that.

like image 186
Kevin Peterson Avatar answered Sep 24 '22 06:09

Kevin Peterson