Best configuration for drupal site?

Hi

Which configuration is better for site?

Site run source drupal 7,on vps 1024 linode.

I was read many about:

1)Apache + Fastcgi

2)Nginx + Php-fpm

3)Nginx reverse proxy for apache run php backend…

Or anything else?

Thank you.

17 Replies

Personally I'd go for nginx + fpm/fcgi, drupal (depending on what modules you're using) can be quite heavy on the php side so it's wise to skip apache and mod_php.

I use drupal 6 with nginx +fpm, not tried drupal 7 yet.

@obs:

Personally I'd go for nginx + fpm/fcgi, drupal (depending on what modules you're using) can be quite heavy on the php side so it's wise to skip apache and mod_php.

I use drupal 6 with nginx +fpm, not tried drupal 7 yet.
Thanks.

I run on vps 1024 but ab ben show score ending at 30req/s w/o cache and 400req/s with cache.How about that score?

ab scores are all relative depending on where you're running it from, a dialup connection for example will have a much lower ab score than a dsl connection, and a dsl will have a much lower score than one from another linode.

However 400/requests/second should be decent enough, try running ab from other machines and test your responsiveness.

How many hits per day do you get?

If you plan to host more than few websites, consider Aegir for automatic installation / upgrades of drupal sites.

There is nice script for installation of Aegir + Ngnx + php-fpm + APC but be aware it is complex… :idea:

nginx + php-fpm FTW, it's the best combo that you can get as of 2011.

400 requests per second for a dynamic website looks pretty good. Is that just the home page, or do you get similar results if you point ab at another dynamically generated page?

If you'd like to throw one or more memcached instances at Drupal/Aegir, check out LinCached from Linsides.com

Frankly though, 400 requests/sec should be plenty.

If you go with nginx, we have a pretty helpful group of drupal users over at http://groups.drupal.org/nginx if you have any questions or run into any configuration problems.

There're some good configs linked there also.

One more vote for nginx/php-fpm.

I have used this configuration

https://github.com/perusio/drupal-with-nginx

Pretty self explanatory.

w/o cache: 18req/s……

How about nginx frontend for apache backend-php?

@rok:

w/o cache: 18req/s……

How about nginx frontend for apache backend-php?

Why? If you want to use Apache then either don't use nginx or use nginx only for the static resources.

Alternatively use only nginx. Adding Apache to only process php will make you use more resources to achieve the same thing. I sincerely doubt that the configuration you just mentioned is going to give you what you are looking for.

Actually nginx proxying back to apache with mod_php does reduce memory and speed things up.

Static files are served by nginx so are very quick, and mod_php is a fast way of running php files so again php files are run quickly, and since apache doesn't have to have many processes running you save RAM, you can also play with apache rewrite rules this way.

However I still prefer nginx+fpm

Thanks.

And hơw about litespeed ?license version.

@rok:

Thanks.

And hơw about litespeed ?license version.
Why pay for something when you can get something that does the same job for free?

@obs:

Actually nginx proxying back to apache with mod_php does reduce memory and speed things up.

Static files are served by nginx so are very quick, and mod_php is a fast way of running php files so again php files are run quickly, and since apache doesn't have to have many processes running you save RAM, you can also play with apache rewrite rules this way.

However I still prefer nginx+fpm
Just to clarify things on behalf of @obs, he means that the proxy setup saves memory and makes things faster compared to using Apache alone.

If the comparison is between nginx+fpm and nginx+Apache, there is no real difference. 10 Apache processes with mod_php use about as much memory and can serve up about as many pages per second as 10 fpm processes.

One drawback of the proxy setup is that you need to maintain two web servers now. If you want to change anything, for example add a new virtual host or change the document root, you must edit configurations of two web servers and make sure that they're perfectly in sync.

@hybinet:

@obs:

Actually nginx proxying back to apache with mod_php does reduce memory and speed things up.

Static files are served by nginx so are very quick, and mod_php is a fast way of running php files so again php files are run quickly, and since apache doesn't have to have many processes running you save RAM, you can also play with apache rewrite rules this way.

However I still prefer nginx+fpm
Just to clarify things on behalf of @obs, he means that the proxy setup saves memory and makes things faster compared to using Apache alone.

If the comparison is between nginx+fpm and nginx+Apache, there is no real difference. 10 Apache processes with mod_php use about as much memory and can serve up about as many pages per second as 10 fpm processes.

One drawback of the proxy setup is that you need to maintain two web servers now. If you want to change anything, for example add a new virtual host or change the document root, you must edit configurations of two web servers and make sure that they're perfectly in sync.
Thanks.

I run nginx with php-fpm and see fast than apache-php.

But i heard wome one say nginx -apache php backend reduce cpu load?how about this? :roll:

It's up to you. Like I wrote, I personally went for nginx/php-fpm. I don't know which setup is perfect and probably that would depend on what you are running vs. the actual packages themselves (apache and nginx).

I would suggest you check the nginx configuration pages to ensure that you fine tune it to your specifications. A bad configuration will definitely impact your site.

HTH

@hybinet:

@obs:

Actually nginx proxying back to apache with mod_php does reduce memory and speed things up.

Static files are served by nginx so are very quick, and mod_php is a fast way of running php files so again php files are run quickly, and since apache doesn't have to have many processes running you save RAM, you can also play with apache rewrite rules this way.

However I still prefer nginx+fpm
Just to clarify things on behalf of @obs, he means that the proxy setup saves memory and makes things faster compared to using Apache alone.

If the comparison is between nginx+fpm and nginx+Apache, there is no real difference. 10 Apache processes with mod_php use about as much memory and can serve up about as many pages per second as 10 fpm processes.

One drawback of the proxy setup is that you need to maintain two web servers now. If you want to change anything, for example add a new virtual host or change the document root, you must edit configurations of two web servers and make sure that they're perfectly in sync.
Thanks.

I finished with varnish caching front end- nginx-php-fpm backend:D.

Finished at 7000r/s with cache.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct