Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Mar 23, 2011 5:56 am 
Offline
Senior Newbie

Joined: Mon Jan 25, 2010 3:38 am
Posts: 6
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.


Top
   
 Post subject:
PostPosted: Wed Mar 23, 2011 7:17 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
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.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Wed Mar 23, 2011 7:37 am 
Offline
Senior Newbie

Joined: Mon Jan 25, 2010 3:38 am
Posts: 6
obs wrote:
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?


Top
   
 Post subject:
PostPosted: Wed Mar 23, 2011 8:03 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
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?

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Wed Mar 23, 2011 4:46 pm 
Offline
Senior Newbie

Joined: Mon Mar 07, 2011 6:49 am
Posts: 9
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:


Top
   
 Post subject:
PostPosted: Wed Mar 23, 2011 4:54 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
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?


Top
   
 Post subject:
PostPosted: Wed Mar 23, 2011 4:57 pm 
Offline
Senior Member

Joined: Mon Oct 27, 2008 10:24 am
Posts: 173
Website: http://www.worshiproot.com
<shameless plug> If you'd like to throw one or more memcached instances at Drupal/Aegir, check out LinCached from Linsides.com </shameless plug>

Frankly though, 400 requests/sec should be plenty.


Top
   
 Post subject:
PostPosted: Thu Mar 24, 2011 12:18 pm 
Offline
Senior Member

Joined: Sun Feb 21, 2010 5:12 pm
Posts: 64
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.


Top
   
 Post subject:
PostPosted: Thu Mar 24, 2011 12:40 pm 
Offline
Senior Newbie

Joined: Wed Mar 23, 2011 9:42 pm
Posts: 11
Website: http://www.niden.net
Location: Charles Town, WV
One more vote for nginx/php-fpm.

I have used this configuration

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

Pretty self explanatory.

_________________
W: niden.net
T: nikosdimopoulos


Top
   
 Post subject:
PostPosted: Thu Mar 24, 2011 5:28 pm 
Offline
Senior Newbie

Joined: Mon Jan 25, 2010 3:38 am
Posts: 6
w/o cache: 18req/s......
How about nginx frontend for apache backend-php?


Top
   
 Post subject:
PostPosted: Thu Mar 24, 2011 9:01 pm 
Offline
Senior Newbie

Joined: Wed Mar 23, 2011 9:42 pm
Posts: 11
Website: http://www.niden.net
Location: Charles Town, WV
rok wrote:
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.

_________________
W: niden.net

T: nikosdimopoulos


Top
   
 Post subject:
PostPosted: Fri Mar 25, 2011 7:33 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
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

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Fri Mar 25, 2011 11:54 pm 
Offline
Senior Newbie

Joined: Mon Jan 25, 2010 3:38 am
Posts: 6
Thanks.
And hơw about litespeed ?license version.


Top
   
 Post subject:
PostPosted: Sat Mar 26, 2011 6:11 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
rok wrote:
Thanks.
And hơw about litespeed ?license version.

Why pay for something when you can get something that does the same job for free?

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Sat Mar 26, 2011 2:14 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
obs wrote:
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group