GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Apache, Nginx, Lighttpd? (https://gfy.com/showthread.php?t=1056625)

Emil 02-07-2012 12:55 PM

Apache, Nginx, Lighttpd?
 
What would be the best option? I have some TGPs, forums and lots of Wordpress blogs.

No site is getting that much traffic except the forums that receive about 50k pageviews/day.
The blogs get about ~9k uniques/day.

And this server:
Core2Quad Q8200 QUAD CORE 2.33GHZ - RAM: 4GB

What should I choose of Apache, Nginx or Lighttpd and why?

mafia_man 02-07-2012 01:04 PM

Nginx because the defaults it comes with are good. You need to know how to config it though, use php-fpm for PHP.

4 worker processes and 1024 worker connections should be fine.

mikke 02-07-2012 02:09 PM

nginx as reverse proxy for apache2,
apache2 with php5 and few mods,
hit me up on icq if you need help to configure it..

Klen 02-07-2012 02:21 PM

I use nginx and php-fpm,dont bother with load since i using it.Also i just checked some benchmarks to see did something changed in the meantime and nginx still beats everything else when it come to speed and resource usage.

AdultEUhost 02-07-2012 02:30 PM

assuming you have a managed server I would go a different route

1) setup optimized apache/php5 for the main sites (strip the modules and tweak the fork)

2) setup lighttpd/nginx for your forum attachments/uploads and all other static files

If you can't or don't want to do that pick nginx for everything.

raymor 02-07-2012 03:20 PM

Nginx and lighttpd have some pretty fervent fans who like to argue, so I won't get into taking too much about either of them, but I'll just tell you what we did after pretty extensive testing on a site doing 400 Mbps (120,000 GB / month).

Add "noatime" to /etc/fstab . This is very important.

In Apache, comment out the twenty or so modules you're not using, like mod_speling and mod_auth_group.

Enjoy a server that is as fast as your disks can spit out files, standards compliant, and doesn't have grotesque bugs from six years ago still not fixed.

Klen 02-07-2012 04:18 PM

Quote:

Originally Posted by raymor (Post 18741266)
Nginx and lighttpd have some pretty fervent fans who like to argue, so I won't get into taking too much about either of them, but I'll just tell you what we did after pretty extensive testing on a site doing 400 Mbps (120,000 GB / month).

Add "noatime" to /etc/fstab . This is very important.

In Apache, comment out the twenty or so modules you're not using, like mod_speling and mod_auth_group.

Enjoy a server that is as fast as your disks can spit out files, standards compliant, and doesn't have grotesque bugs from six years ago still not fixed.

What if you need atime,wbat then ???

raymor 02-07-2012 04:48 PM

Quote:

Originally Posted by KlenTelaris (Post 18741416)
What if you need atime,wbat then ???


If you need atimes and so can't use noatime, consider if relatime will work for you. If you do need atimes, you can NOT use nginx because it causes atime updates to be skipped whether you like it or not. That's why in tests with atimes on it appears faster on small files - because it's (erroneously) skipping atime updates.

That's how we found out about the importance of noatime. Analyzing the nginx code to see why it appeared to be faster for tiny files, I found that the only significant speed difference was skipping that disk access, even if the server admin had specified otherwise.

If you have to have atimes and relatime won't work, then, you need a server which allows atimes to be updated correctly (Apache) and a storage subsystem with low rotational latency (high RPM) and low seek times.

mikke 02-07-2012 05:16 PM

Quote:

Originally Posted by AdultEUhost (Post 18741140)
assuming you have a managed server I would go a different route

1) setup optimized apache/php5 for the main sites (strip the modules and tweak the fork)

2) setup lighttpd/nginx for your forum attachments/uploads and all other static files

If you can't or don't want to do that pick nginx for everything.

why would you like to setup another instance of web server for static files like images/css/js? it's waste of money and time..
why making another dns request and forcing user to connect to another host?

all what you need is nginx, you have choice between:
* nginx+php5fpm
* nginx as reverse proxy + apache2

now.. you are turning on in nginx config:
* expires for static files
* all files are serving direct from hdd, not by requesting apache2
* memcache for all dynamic sites where user is not logged, with expiry time like 5sec..

i choosed second setup (reverse proxy) and my box - 2x3ghz, 4gb of ram is handling dynamic site with over 400 users online (via google analytics realtime), near 350k page views per day and like 1.3mln hits per day.. load time? less than 1s..


All times are GMT -7. The time now is 09:00 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123