Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"There are numerous modules and setup stuck in prefork mode"

I have no idea what in the heck you are talking about. If one must use mod_php than it is recommended that you avoid a threaded MPM, but even that is no longer 100% true; you can run mod_php and Event is most implementations with no issues at all.

"stuck in prefork mode" is a nonsensical phrase. prefork is a MPM.

Just because something is threaded doesn't make it slow. Take varnish for example. There are tradeoffs on all implementations, that's why Apache httpd allows for prefork, worker(threaded) and event-based architectures which the sysadmin/devops can choose for their own particular case. But "Oog. Event be Good. Threads be Bad" is really completely missing the very real tradeoffs of both.



Apache default is prefork, which was appropriate to run php app the way they were done more than a decade ago. It is utterly inappropriate nowadays.

For load balancing, events trumps every other mode, that's just the way it is.

HTTP and TCP balancing are inherently mono thread operations. There is no need for threading at all, multiple threads are actually decreasing performances).

In HTTPS and TLS mode, the encryption is the bottle neck. So you use one process per core (that process needs events).

HaProxy lets me have one process pinned down to each core of the system while network card IRQ are on a dedicated core. Apache can't do half of that.

We could get into how nginx and HaProxy parser are insanely optimized. Whereas apache is not and it cannot be because of the modules.

Of course, not everyone has to push 10g or 30k requests/s with their load balancers.


Apache default is NOT prefork, unless you are using something older than Apache 2.4. Of course it is utterly inappropriate nowadays, which is why NO ONE USES IT, but people love spreading the FUD that Apache is still prefork.

The rest of your "analysis" suffers from the same misinformation as this. I especially like "Whereas apache is not and it cannot be because of the modules.". I have no idea what in the world you mean by that. Why "because of the modules"?


Having modules require apache to parse a lot of information from the request, and make them available and editable in variables.

This gives a lot of flexibility but it has a performance costs.


And this differs from nginx how, exactly? Since it also "has modules"... So since nginx has modules it requires nginx to "parse a lot of information from the request, and make them available and editable in variables. This gives a lot of flexibility but it has a performance costs." ??




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: