Drupal in the Cloud

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
grayloon's picture

I'm converting a site from regular PHP/MySQL to Drupal. Average traffic for this site over the last 12 months is:
Page Views: 1,400,000/month
Visitors: 170,000/month

I have a Rackspace Cloud Server set up with 2GB RAM + 80GB HD + quad-core AMD Opteron @ 3Ghz. The cloud server is running CentOS 5.3, cPanel, Apache 2.2, PHP 5.2.13, and MySQL 5.0.90.

Load testing with 100 clients caused the server load to skyrocket. Would the best approach be:
1. Increase the RAM and HD on the existing cloud server
2. Add another cloud server to offload the database duties

Comments

<cough>Mercury<cough>

gchaix's picture

Seriously, check out Project Mercury. That will likely help your load issues a lot.

Is your traffic primarily authenticated or anonymous users? Are you I/O-bound, CPU-bound, or running out of RAM? Do you have APC enabled?

Alternately, take a look at Varnish (with Pressflow) or Boost. Either will significantly lower the load on the system for anonymous traffic and may help somewhat with authenticated users. A properly-configured APC with cacherouter and/or memcache will help reduce the load for all users (anon as well as auth). Varnish + APC + memcache = essentially the Mercury stack.

Kill cPanel. I've heard it's a resource black hole. I'm pretty sure cPanel-enabled systems tend to have a lot of extra unnecessary services running that suck up RAM and CPU cycles.

All of the above, plus

Garrett Albright's picture

All of the above, plus perhaps also consider ditching Apache as well as cPanel.

Throwing more virtual hardware at a problem is almost as bad as throwing more real hardware at one.

Before you consider more

willieseabrook's picture

Before you consider more hardware...

Have you done everything you can to optimize the software end? If there's scalability issues in your modules, or the way you have Drupal set up, then throwing hardware ain't going to help.

Sometimes you've got to suck it in and spend a couple of days profiling and coding.

Then, if you're certain you can't optimize your code any more, look at what @gchaix says.

Then another thing to consider is there are some cloud providers out there that will help you out managing all the vertical or horizontal scaling issues for you - if that's not your area of specialty.

Replace Apache with nginx

benoit.borrel's picture

You could also consider Nginx instead of Apache...

Benoit Borrel