Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › nginx or apache: which and reasons why?
New Posts  All Forums:Forum Nav:

nginx or apache: which and reasons why?

post #1 of 24
Thread Starter 

I'm currently tasked with setting up a new dedicated server for a client.

 

They are one of those people that don't know a whole lot about computers, but they have that <insert friend/family member here> that in 1978 took a computer class, and knows how to use google...

 

So according to this "person", I should configure this guys dedicated server with nginx instead of apache. I've done some research on the subject, apache vs nginx, most of what i can find is typically from one camp beating their drum louder.

 

from the concrete evidence i can find, i would make these assumptions about nginx:

 

its event based, meaning it uses less ram than apache for certain circumstances.

its better at serving static content than apache is, under higher connections.

less performance degradation than apache, when it comes to serving static pages. 

less documentation than apache, less mods than apache.

 

apache:

 

apache tried and true

lots of mods

highly documented

I know apache quite well

scalability

 

 

about the guys site:

 

Very little if any of the site will be "static", Most of the site will be generated dynamically via a php framework and mysql database (using a cache system, more than likely memcache). it is expected on average to have about 3k to 6k members at a time browsing the site. we will be using a CDN to deliver Images and Javascript.

 

Now everything i've read and know says apache is better suited for this task than nginx. any sys/server admin have experience with nginx in environment that the site is rendered almost completely dynamically, using a cache and CDN compared to the same running in apache. 

 

the server is quite powerful, resources aren't much of an issue atm. I do want to provide the client with the best solution, I just always take "this <insert friend/family member>, knows at hing or two about these things, and they have said...", type of statements with grains of salt, and when my own research is not able to return imho valid results to support such a claim, i usually stick with what i know, but something has told to delve deeper into the subject. so any one who can provide any factual information, i would appreciate it.

Bazinga Punk
(12 items)
 
ooh shiny!
(12 items)
 
 
CPUMotherboardGraphicsRAM
Intel Xeon 3440 AsRock P55 extreme Evga 8800 GT 512 MB Gskill Ripjaws 
Hard DriveCoolingOSMonitor
Western Digital Blue Antec Khuler 620 Ubuntu 11.10 Asus vw264H 
KeyboardPowerCaseMouse
GIGABYTE KM7600 CORSAIR TX 650 Cooler Master 590 GIGABYTE GM-M6800 
CPUMotherboardGraphicsRAM
Intel Core I5 6500 Gigabyte z170xp-SLI Nvidia 970gtx Corsair 16gb ddr4 2666mhz  
Hard DriveHard DriveOSMonitor
250gb Samsung Evo 850 250gb Samsung Evo 850 Windows 10 Samsung 43" 4k MU6300 
KeyboardPowerCaseMouse
Logitech Orion Spark 750w corsair Corsair 230T (Orange) Logitech G700 
  hide details  
Reply
Bazinga Punk
(12 items)
 
ooh shiny!
(12 items)
 
 
CPUMotherboardGraphicsRAM
Intel Xeon 3440 AsRock P55 extreme Evga 8800 GT 512 MB Gskill Ripjaws 
Hard DriveCoolingOSMonitor
Western Digital Blue Antec Khuler 620 Ubuntu 11.10 Asus vw264H 
KeyboardPowerCaseMouse
GIGABYTE KM7600 CORSAIR TX 650 Cooler Master 590 GIGABYTE GM-M6800 
CPUMotherboardGraphicsRAM
Intel Core I5 6500 Gigabyte z170xp-SLI Nvidia 970gtx Corsair 16gb ddr4 2666mhz  
Hard DriveHard DriveOSMonitor
250gb Samsung Evo 850 250gb Samsung Evo 850 Windows 10 Samsung 43" 4k MU6300 
KeyboardPowerCaseMouse
Logitech Orion Spark 750w corsair Corsair 230T (Orange) Logitech G700 
  hide details  
Reply
post #2 of 24
They're both great web servers. So I think your decision boils down to one of two things:
Would you rather than a low footprint server or one with the most online tutorials?

By the sounds of it, I think you'd rather opt for the latter otherwise you'd have done your own thing rather than asking on a forum. But in honesty, you can't got far wrong with either of them.

[edit]

Just spotted that you already know Apache quite well. In that case just stick with what you know. smile.gif
post #3 of 24
Quote:
Originally Posted by Plan9 View Post

Just spotted that you already know Apache quite well. In that case just stick with what you know. smile.gif

I agree, if you already know Apache then there's no reason to go with anything else. Both are great either way though.
post #4 of 24
Thread Starter 

Yeah i figured as much, that there wasn't a huge amount of difference in the two. I'm sure they both suit their purposes. I'm not particular tied to apache by any means, it is just one i know better cause it is the one i've used the most. I will probably setup a vbox later and test out nginx on my own, but it will probably be awhile before i ever consider running it on a production server till i find out more about it.

Bazinga Punk
(12 items)
 
ooh shiny!
(12 items)
 
 
CPUMotherboardGraphicsRAM
Intel Xeon 3440 AsRock P55 extreme Evga 8800 GT 512 MB Gskill Ripjaws 
Hard DriveCoolingOSMonitor
Western Digital Blue Antec Khuler 620 Ubuntu 11.10 Asus vw264H 
KeyboardPowerCaseMouse
GIGABYTE KM7600 CORSAIR TX 650 Cooler Master 590 GIGABYTE GM-M6800 
CPUMotherboardGraphicsRAM
Intel Core I5 6500 Gigabyte z170xp-SLI Nvidia 970gtx Corsair 16gb ddr4 2666mhz  
Hard DriveHard DriveOSMonitor
250gb Samsung Evo 850 250gb Samsung Evo 850 Windows 10 Samsung 43" 4k MU6300 
KeyboardPowerCaseMouse
Logitech Orion Spark 750w corsair Corsair 230T (Orange) Logitech G700 
  hide details  
Reply
Bazinga Punk
(12 items)
 
ooh shiny!
(12 items)
 
 
CPUMotherboardGraphicsRAM
Intel Xeon 3440 AsRock P55 extreme Evga 8800 GT 512 MB Gskill Ripjaws 
Hard DriveCoolingOSMonitor
Western Digital Blue Antec Khuler 620 Ubuntu 11.10 Asus vw264H 
KeyboardPowerCaseMouse
GIGABYTE KM7600 CORSAIR TX 650 Cooler Master 590 GIGABYTE GM-M6800 
CPUMotherboardGraphicsRAM
Intel Core I5 6500 Gigabyte z170xp-SLI Nvidia 970gtx Corsair 16gb ddr4 2666mhz  
Hard DriveHard DriveOSMonitor
250gb Samsung Evo 850 250gb Samsung Evo 850 Windows 10 Samsung 43" 4k MU6300 
KeyboardPowerCaseMouse
Logitech Orion Spark 750w corsair Corsair 230T (Orange) Logitech G700 
  hide details  
Reply
post #5 of 24
I would go with Apache too ! There is hundreds and hundreds tutorials . A lot tweakable. There is no real reasons to not choose it... and if you knoow apache more than the other, well... smile.gif Just take it ! I used to developps Webserver on Linux and this is mainly on Apache i was working on. I would take Apache without hesiations smile.gif
My 2012-13 build
(23 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7 2700K Intel Extreme Series Desktop Board DZ68BC  EVGA GTX 670 FTW 4GB Kingston Hyperx Blu 8GB 
RAMHard DriveHard DriveHard Drive
Kingston Hyperx Blu 8GB Intel SSD 520 Series Cherryville Western Digital Caviar Green 2 TB Western Digital Caviar Green 2 TB 
Optical DriveCoolingCoolingCooling
MoDisc DVD Rom Phanteks PH-TC14PE CPU Cooler 120mm Corsair Air Series AF140 Quiet Edition (r... 120mm Noiseblocker Multiframe M12-PS (bottom in... 
CoolingOSMonitorMonitor
120mm Noiseblocker Multiframe M12-PS (top exhau... Microsoft Windows 7 Professional OEM 64-bit French Acer S230HL 23inch monitor Acer X203W 20inch monitor 
KeyboardPowerCaseMouse
Saitek Eclipse II keyboard Cooler Master GX 750 PSU Corsair Carbide 500R Black Case Razer DeathAdder Mouse 
Mouse PadAudioOther
Diablo 3 Witch Doctor Mousepad Harman Kardon Champagne Black audio DEMCi Flex Fan Filters 
  hide details  
Reply
My 2012-13 build
(23 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7 2700K Intel Extreme Series Desktop Board DZ68BC  EVGA GTX 670 FTW 4GB Kingston Hyperx Blu 8GB 
RAMHard DriveHard DriveHard Drive
Kingston Hyperx Blu 8GB Intel SSD 520 Series Cherryville Western Digital Caviar Green 2 TB Western Digital Caviar Green 2 TB 
Optical DriveCoolingCoolingCooling
MoDisc DVD Rom Phanteks PH-TC14PE CPU Cooler 120mm Corsair Air Series AF140 Quiet Edition (r... 120mm Noiseblocker Multiframe M12-PS (bottom in... 
CoolingOSMonitorMonitor
120mm Noiseblocker Multiframe M12-PS (top exhau... Microsoft Windows 7 Professional OEM 64-bit French Acer S230HL 23inch monitor Acer X203W 20inch monitor 
KeyboardPowerCaseMouse
Saitek Eclipse II keyboard Cooler Master GX 750 PSU Corsair Carbide 500R Black Case Razer DeathAdder Mouse 
Mouse PadAudioOther
Diablo 3 Witch Doctor Mousepad Harman Kardon Champagne Black audio DEMCi Flex Fan Filters 
  hide details  
Reply
post #6 of 24
Just to add into the confusion Hiawatha is an excellent server, very easy to setup and PHP with it, is like lightning.
post #7 of 24
Another vote here for apache. It's tried and true, and is still being used even when there are alternatives. If it's not broke don't fix it. tongue.gif
Mini Build
(9 items)
 
   
CPUMotherboardGraphicsRAM
intel i7 4790k Asrock z97-e  Sapphire R9 290X G Skills 
Hard DriveCoolingOSOS
Samsung EVO  EK Water Blocks Windows 7 Debian  
Case
Bitfenix Mini Colossus  
CPUMotherboardGraphicsRAM
Intel i5-480M OEM Acer Nvidia GeForce GT 540M 4 GB DDR3 
Hard DriveOptical DriveOS
500 GB HDD DVD Drive Crunchbang Linux, Windows 7, BlackBuntu (triple... 
  hide details  
Reply
Mini Build
(9 items)
 
   
CPUMotherboardGraphicsRAM
intel i7 4790k Asrock z97-e  Sapphire R9 290X G Skills 
Hard DriveCoolingOSOS
Samsung EVO  EK Water Blocks Windows 7 Debian  
Case
Bitfenix Mini Colossus  
CPUMotherboardGraphicsRAM
Intel i5-480M OEM Acer Nvidia GeForce GT 540M 4 GB DDR3 
Hard DriveOptical DriveOS
500 GB HDD DVD Drive Crunchbang Linux, Windows 7, BlackBuntu (triple... 
  hide details  
Reply
post #8 of 24
He probably knows I'd vote for Apache, just in case not I'll say it anyways. APACHE!
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #9 of 24
Quote:
Originally Posted by nyxcharon View Post

Another vote here for apache. It's tried and true, and is still being used even when there are alternatives. If it's not broke don't fix it. tongue.gif

Nginx is solid and live on production systems in thousands of data centres. It's anything but an experimental alternative.
post #10 of 24
Quote:
Originally Posted by Transhour View Post

Very little if any of the site will be "static", Most of the site will be generated dynamically via a php framework and mysql database (using a cache system, more than likely memcache).

Cached content is static until it is invalidated by updates. It's possible to use Nginx as a front end webserver which will serve from the cache and hand off the request to Apache if the cache doesn't contain the content requested. Of course if your pages are constantly changing then this is a bad option.
Edited by randomizer - 3/15/13 at 5:49pm
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E Gigabyte GTX 970 (GV-N970IX-4GD) 3x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveOptical DriveOS
840 Pro Caviar Black LG BD-ROM Windows 8.1 Pro x64 
MonitorMonitorKeyboardPower
Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) Corsair HX-520 
CaseMouseMouse PadAudio
CM690 Mionix Avior 7000 Everglide Titan AKG K 242 HD 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E Gigabyte GTX 970 (GV-N970IX-4GD) 3x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveOptical DriveOS
840 Pro Caviar Black LG BD-ROM Windows 8.1 Pro x64 
MonitorMonitorKeyboardPower
Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) Corsair HX-520 
CaseMouseMouse PadAudio
CM690 Mionix Avior 7000 Everglide Titan AKG K 242 HD 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › nginx or apache: which and reasons why?