I am looking to release a small side-project web app hosted on EC2, initially using the new micro instances. This will be a mono based web app with a MySQL backend. I know this won't handle much load, but I'd like to encounter that problem before throwing more resources at it!
I am looking at running two instances to separate the db and the web server. Is it critical to set up some kind of VPN/tunnel for them to talk, or just set the security settings based on IP address?
In general, any recommendations or best practices for backups and security in this configuration. Daily snapshots are great for the regular backups, but how should I achieve more timely backups for the database?
From my experience, you don't need a VPN. Something like what this article mentions should work just fine: http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-...
For backups, you should set up your database on an EBS volume and you can then run a cron script to take snapshots on a regular basis. Could be hourly even, because it freezes the database instantly and allows it to continue operating with minimal delay. I have a 2 GB database that I snapshot in under a second. This is the ultimate article on using MySQL on EC2: http://developer.amazonwebservices.com/connect/entry.jspa?ex...
I did a two server setup on Amazon, and it was nice because you can scale up the web and db servers separately, depending on where the load is. It's also a lot easier to debug system related issues because you've already narrowed down half the possible search space. Make sure CloudWatch is enabled, because that's invaluable. I scaled up to an extra large web server and extra large high-cpu database server, and that handled up to roughly 600 req/sec for my PHP app.
For security, I'm not an expert so I can't give much advice here, but EC2 at least does a good job of restricting access on all ports by default. When you set up your servers, make sure to punch a hole in your security group for port 3306 so that MySQL can connect between the two.