What are the advantages and disadvantages between Apache and nginx?

19

I see a lot of people recommending nginx on Apache [HTTP Server], and I can well understand why the first event-driven it brings scalability advantages (ie low memory consumption under load heavy) over the process-based approach of the second. But I'm not sure about its drawbacks, or cases where Apache would be a better solution. Citing for example this site (which talks a lot about nginx but almost nothing about Apache):

  

Apache is like Microsoft Word, it has a million options but you only need six. Nginx does these six things, and five of them 50 times faster than Apache.

What situations then would Apache be the best solution? Or: what are the main points of difference between them, which may be key to the choice between one and the other in a given situation?

    
asked by anonymous 10.07.2014 / 18:01

1 answer

6

I believe that experience in using each of these servers is critical.

Any of them can be easily "bogged down" from addons and soon lose performance, but also, especially Apache, can be clean and have high performance.

I've been working with Apache for years and not the change. I have servers with different purposes and achieved performance similar to those released by nginx, and still retaining years of experience and far from abstraction leakage.

Well, my suggestion is: Both are good, so if you have no experience in any of them, you can choose any one, and even seems to be a better option to nginx, however, only by performance indicators released by the evangelists, after all, problems like the C10k problem have already been solved long ago by Apache but are still used as an argument in the lectures on nginx.

I'm on the team that thinks "Panela Véia is what makes good food": D

But, let's go to the numbers:

For smaller file delivery, Nginx performs better in high volume requests, as PHP processing gets better in Apache 2.4

Source of images: link

    
10.07.2014 / 20:10