I'm in the process of researching hosting providers for a high traffic Facebook application.

The client has over 300,000 likes so we can expect quite a bit of traffic when posts are made about it and there are a dozen of so celebrities involved in promoting it on their end.

The app itself, in staging at the moment, is built with Codeigniter and is running a MySQL database. Only one table, of two, is expected to grow significantly through user interaction with the app.

Most of the traffic will be coming from the UK.

Overall page sizes with all assets loaded will be less than 1mb.

For other similar applications we have used a Cloud VPS with the following configuration:

Monthly Bandwidth - 1TB RAM - 2GB Storage - 75GB CPU - 2 x Xeon 2.33Ghz

Any advice would be great appreciated!


If you are using PHP on a high traffic website, you need to use a PHP Accelerator. It will cache the compiled versions of your PHP files so that the server doesn't have to re-compile them on every page load. In my experience, it can speed a PHP webapp up by a factor of ten to twenty. Wikipedia also has a list of PHP Accelerators that you can choose from.

Beyond that, all of the advice that I have would be for high performance webapps based on any platform:

  • You won't know what your bottlenecks are going to be without load testing. Do the load testing before you launch.
  • Cache as much data from your database locally in memory as feasible.
  • Monitor the number of database queries performed per page view. In addition to implementing caching, make sure you don't have database calls inside for loops. Re-write those to fetch all the data you need in a single query.
  • Build your app to be horizontally scalable. You want to be able to put your webapp behind a load balancer and be able to add instances. This may mean that you can't rely on local storage for sessions, file uploads or other items that each instance would need access to.
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.