Over the last few days I've come to the realization that a single 256 MB VPS isn't going to cut it even for the prototype of my application. The problem is that I will have a number of background running tasks that can be CPU, memory, and network intensive and I just won't want those running on my web server. The issue is that I'm on less than a shoestring budget, so I can't really pay to have a few servers turned up all the time.
This is exactly why I'm thinking about EC2. The stats look pretty good. At least 1.76 GB of memory is much better than the 256 MB I have now. The concern I have is running my app and database only on EC2. I've noticed a bunch of chatter about this, but I think it's ok for my needs. I won't be storing mission critical data so if I just run a backup to S3 every few hours I should be fine. From what I've read on different blogs and forms, the service is pretty reliable so I shouldn't even have to worry about it (but of course I will).
Now for the costs. The average to keep one server turned up full time is about $73 a month before bandwidth. The bandwidth is super cheap so I'm not really worried about that. I'm currently paying $20 for my VPS so I could actually be running about 4 of the same VPS systems for around the same price. However, with EC2 I get a lot more memory which is important based on my tests over the last few days. The other advantage is that I can turn up more instances as needed and just shut them down when I'm done. This is very attractive to me right now since I know that I won't be running the secondary servers all the time and I can just pay for the hours I need them.
I have a few concerns about things that I'm pretty sure I already know the answer to. First, I'm worried about the storage on the actual EC2 systems. If I'm running a DB server on a node, is the storage on the EC2 node an actual connected hard disk? I know that it's volatile which is the reason for the backups to S3, but I just want to make sure that the DB calls to the file system aren't running over some freakish NFS. Second is the issue of how to point my DNS record to an EC2 system. What if my node goes down and I have to restore? From my understanding they are DHCP and I can't be sure that my IP will remain the same. Do I have to use dynamic DNS?
Does anyone out there with experience running apps exclusively from EC2 have advice or suggestions?
Since I got accepted into the beta a few weeks ago I think it's just time to play around with it and see what I can come up with.
Technorati Tags: ec2, aws, hosting
Paul,
All storage supplied with your ec2 instance is transient so if you run a database instance on it, you have to do something like write ahead logging (in postgres) to an s3 instance. Another thing I've heard is this: http://www.openfount.com/blog/s3dfs-for-ec2 which lets you mount an s3 store as a filesstem under ec2, then presumably you could use it transparently. I have no experience with either of these methods directly but have been reading up on them in an attempt to evaluate EC2 hosting...hope that helps! See also - http://del.icio.us/skwp/ec2
Posted by: Yan | July 05, 2007 at 12:44 PM
Yan, keeping the database on a mounted S3 instance is exactly what I want to avoid. That's like keeping your database on NFS which I would guess kills performance. The three options I have heard are:
1. Run periodic backups of the DB to S3
2. Write the log files to S3 so you can restore
3. Create another EC2 node as a slave
I'm not worried about being able to persist the DB. Really I'm just worried about if the transient storage provided by EC2 is actual connected hard disk storage. My understanding is that you can even reboot an EC2 node without the data in transient storage being lost. You just can't kill the instance. At least this is what I've read.
Posted by: Paul Dix | July 05, 2007 at 12:58 PM