I want to host a website on an Amazon EC2 instance, but for reliability purposes, I want to have the underlying database on some more permanent storage medium. There won't be any file uploading or anything like that, but I want to make sure that the database queries and updates are going quickly. Should I use EBS or S3 for this?
And just comment if you want more info
You can not store a database on S3. If you intend to store your database anywhere it will either be on EBS or on instance storage.
Just to build on the other very nice answers, you can store your database as a .sql file on s3. But your website/application can't make queries to this file because s3 has no MySQL program (file!=database).
Amazon RDS stores backups of your database to s3 as .sql files (I assume) which they programmatically access and use to restore your RDS database instance in the event of its failure.
The advantages of EBS vs. RDS are stated in other answers but just to be clear, a key benefit of RDS is that Amazon takes care of restoring your failed instance by providing backups, etc.
I'm not sure about the DB replication part though as that appears to be a separate concept and I've read that this is NOT a feature of RDS. More experienced DBAs seem to point this out often as a reason NOT to use RDS. Might someone clarify this?
Like, @Femi said, you can not use S3 for DB, but you can use one of these instance-store/EBS/RDS. More info below:
Instance store will disappear if your instance is crashed, + EBS volume got quite a good problem recently - though this is good over instance-store, I would suggest you to have a look at Amazon RDS, I had used it for one my project and it's super cool.
Amazon RDS has got quite a good advantages:
http://aws.amazon.com/rds/
Features:
When you compare EBS with RDS, both are charged where as little extra on RDS when compared to EBS, but its worth. Amazon takes care of everything and if your site is traffic-driven, it has got solution to replicate automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With