Hello! I often hear that the NGINX web server is much faster than Apache `a, but nevertheless Apache is used in almost 60% of modern sites. So I wonder why the choice remains for Apache, if nginx is able to withstand much stronger loads? And is there a significant difference between these two solutions? Thank.
3 answers
"Is there a significant difference between the two solutions?"
There it is, first of all, that apache works according to the principle - new request = new thread, nginx works using the event model, respectively, the new request does not generate new threads. Apache is so common because it is popular (the same, for example, with Windows).
Quite often Apache is used as a back-end server. Those. nginx is engaged in issuing statics and proxying other Apache requests. If there is an opportunity to refuse Apache in general, IMHO, it is worth doing.
Anyway, in projects of adequate scale with almost 100% probability the front-end server costs nginx, whether the server is written in C ++, java or php, node.js.
"is there a significant difference between the two solutions"
In general, basically the difference in approach:
запрос -> поток // vs запрос -> событие
PS: you may be interested in this.
Talking about the complete replacement of apache by nginx, is the same as talking about a complete replacement of fighter jets by bombers: it seems like both can fly, but the latter do it faster.
Apache and nginx are two completely different products that are only partially suppressed in the target niches; therefore, one will never completely replace the other. And about their functional differences already written many articles .
This is a question from the category: "Why use Windows when Linux surpasses it?" Probably a rhetorical question. Popularity, which is well developed by promoters.
- Winda, by the way, is much better =) - AseN
- This is what? So that under it prudently naplodili software? Or the fact that it does not allow you to be bored, when you are hunting for viruses at a time when, under Linux, somehow it didn’t happen to viruses? - Deonis
- Winda is multifunctional, Linux is limited to its distribution. - AseN
- fourThis business is gainable. Windu for the loot we are driven, so they have money for unlimited development. And take this (here mat) eternal problem with firewood, the definition of iron from Windows. And Linux any hardware and peripherals, as native takes - Deonis
- four@Ilya Pirogov, yeah, she is! In a hurry. What does "distributions that are limited" mean? You both are arguing about things that are poorly understood, judging by your reports. Better Not Need - Dex