The site is a custom written PHP application with a nearly 3NF (highly relational, many foreign keys) Mysql database. This website is about 90% read / 10% write.
Currently, we are on a VPS with 2Gig's of memory and with around 1000 unique visitors per day, and we are finding that this host is failing.
For several reasons, website stability being only one reason (other reasons include shoddy customer support, but that's neither here nor there), we are moving hosts. The top three priorities for this business when selecting a server option is:
- Stability
- Price
- Scalability
I am considering an EC2 deployment. One option that looks extremely attractive to me is starting with two micro EBS instances of a MySQL server and Apache server. While this puts my total memory below my current VPS' 2G, this seems like a really good way to separate database and web serving needs. Would I be better with a higher memory single instance? What other server configurations are out there that I should consider before this?
On a side note, there are many possible avenues of optimization. Some pages (the heavily hit ones) hit 1000+ database queries per page. MySQL is also not as fully tuned as it could be. APC is installed but not utilized in any code.