Question

I've got a new website that is Joomla driven and contains many custom apps that depend on the Mysql database. This is all hosted on Amazon EC2 with the root device being EBS.

My concern is with my Mysql setup. I've installed mysql-server with pretty much default settings (other than the security cleanup).

My question is if I should be setting up Mysql to run on a separate EBS volume: http://aws.amazon.com/articles/1663 or should I even be looking at Amazon RDS: http://aws.amazon.com/rds/mysql/?

These both seem overkill for my startup right now with 0 users. I obviously want to make sure I'm proactive in case this does grow but I have no idea if it will be a major pain to add these later?

Was it helpful?

Solution

I would definitely say you should setup MySQL to run on another EBS volume for many reasons. Here are a few:

  1. Easier backups. You can snapshot the entire EBS volume rather than doing a MySQL dump and pushing it to S3. When you have a snapshot of the volume, you can restore your database much quicker than with a MySQL dump.

  2. Disk contention. You will see some disk contention when you run everything on the same disk. Especially if you are trying to do MySQL replication. I have one volume for MySQL logs, one for Data, and one for everything else.

  3. EBS volumes are relatively cheap.

  4. You can move the entire volume to another instance if you need to.

Overall it is a much better choice. I could give you more reasons if you need them.

I think you could get by on EBS volumes for a while and then decide to shard, rewrite application for NOSql, move to Amazon RDS, etc. But my opinion is to use up MySQL until there is nothing left.

OTHER TIPS

I wrote that MySQL on EBS article before RDS was available.

I would recommend you start with RDS. It's simple to set up, takes care of many worries for you, and is fun.

Only switch to managing your own MySQL if you hit some limitation of RDS down the line (not tremendously likely); and when you do, follow best practices in my article and use a separate EBS volume.

If you do not use RDS, you should consider striping multiple EBS volumes into a software RAID configuration.

If you do not, you may well find that the EBS IO performance is too poor for a modestly busy MySQL instance.

For details on how to do that, check out

http://alestic.com/2009/06/ec2-ebs-raid

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top