Our current architecture of a project is as below. There are 2 amazon instances. Both has Ubuntu 10.10 installed on it.
Instance 1: (m1.large) -- This instance has Php, Apache and MySql installed. It contains main website + API (Developed in Php) + Database (MySql)
Instance 2: (t1.micro) -- This instance has Php, Apache and MySql installed. It contains a Javascript.
Client-Server Interaction: On client side, there is a block of JS code which loads JS file of Instance 2 on client. This JS file creates request and sends it to API on Instance 1. API on instance 1 generates response and sends it to client.
On instance 1 there are cron processes which run on weekly basis, i.e. every Sunday for around 5-6 hrs.
Maximum CPU utilization on instance 1 is around 80% and on Sunday when cron is set to run, it goes above 95%. Average request count per day on main instance is around 225k.
**There is no issue on instance 2 of CPU utilization.Size of database is 7.5 GB**
Need of new Architecture: As we can see, in the current architecture the CPU Utilization is high. If we want to serve more requests, this architecture is not efficient. As our number of clients are increasing, number of requests on server and database size will also increase.
Can you please suggest new architecture design? We are also planning to change our database from MySql to MongoDB. Also, separate Database from instance 1. Is this a right decision?
Can anyone please suggest any new technology which we can implement for the new architecture like Memcached, nginx etc.
Thank you.