« Review of "I Am Legend" (the novel, not the movie) | Main | Stop predicting the death of email (or anything else) »

Comments

sean

you just saved me hours and hours of work. i owe you in a very big way.

Simon

nice topic! :) thank you

Jeff

Nice work. I happened upon your post in a search for an alternate LAMP stack. You are doing this all in 100MB? I was curious... how much per month do you estimate this EC2 deployment will cost you? How is the performance of this deployment compared to a regular light-weight server?

Christian Cantrell

Jeff,

I'm paying just about $300/mo for this instance, including flexible storage -- exactly what I was paying for a physical server with only 2GB of RAM. The performance seems to very good. I haven't had a chance to really push it yet, but it seems faster than my old physical server.

Erik Giberti

Christian,

If I may make a couple of suggestions. I run my instances with an extra EBS volume to do rsync backups and to hold nightly tarballs. I also use symbolic links to point to my php code on /mnt instead of updating the config because sometimes AWS has issues with the EBS stores and when that happens, you will corrupt your database (it happened to me). Unless you're doing software RAID/LVM or something like that with the EBS volumes it's just safer.

Erik

Prakash

Very very helpful post. I thought Elastic Block Storage and S3 are the same... are they not?

Daniel Kadosh

What I do with EBS volumes for MySQL:

I created 2 volumes, set up a software RAID 0 (striping) with them, and then formatted that using the XFS filesystem, as opposed to EXT3.

Benefits:

Striping increases your overall disk speed, and you can easily add more volumes to leverage that. You do pay a small price in CPU for handling the software RAID, but ultimately the biggest limiter for just about any database is simply getting data off the disk.

XFS has one big advantage over EXT3 in that you can freeze the filesystem while a snapshot is taken, thus making it a WHOLE lot safer to do backups. My script for full/incremental backups run in literally in under 3 seconds -- "FLUSH TABLES WITH READ LOCK" in MySQL, xfs_freeze, ec2-create-snapshot, xfs_freeze -u, "UNLOCK TABLES" in MySQL.

So no need to wait for mysqldump, tar, gzip, etc., and it all ends up safely on S3. Moreover, I can create new EBS volumes from that S3 snapshot with essentially real-time data for other testing/dev work. And ec2-create-snapshot is smart enough to handle incrementals transparently for me -- I don't even have to think about full vs. incremental.

Spobin

This is a fantastic article. Thanks Christian!!

Ganak

Question to Author:

For AuthSMTP to work one needs to be able to accept the mail from authsmtp at the @domainame.com address. How was this taken care of?

Ganak

Omar

great post
are there companies out there that give you everything ready made - setting up the instances and doing whatever you need to do?

H. Valle

If you ever come to Shanghai, I'd like to buy you a beer :)
You saved me a lot of time!

B. Laux

That is a great article and just like everyone else says "I owe you a few beers."

Kwan

This was an excellent article. Thanks for saving me a TON of time.

The comments to this entry are closed.

Books

Stories