Live data from Hacker News

Nginx vs Apache performance

blog.webfaction.com

21–30 of 49 posts

Re: Nginx vs Apache performance

#21
One of the things about nginx is the lack of an organised community - for e.g. there is not even an official repository for nginx (http://marc.info/?l=nginx&m=122153991029203&w=2). there are simply some mirrors of people who maintain a patch-based tree (http://mdounin.ru/hg/nginx-vendor-current). There is no bug-tracker (!!), just a wiki page (http://wiki.nginx.org//NginxBugs) and as someone mentioned (http://www.wikivs.com/wiki/Lighttpd_vs_nginx), very less activity on IRC.

It comes down to the original issue of Linus Torvalds, Ingo Molnar and Con Kolivar: do you have a clear roadmap of where the architecture is going, vs a very cool technology that had a lot of support and was no doubt popular.

I am in no way commenting on the technology behind nginx, but as an architect, making a deployment decision that is going to take hell to change later, I would be very concerned.

Re: Nginx vs Apache performance

#23
apache is perfectly capable of saturating the outbound connection on static content on any reasonable setup. you may save a little on memory with nginx but you aren't saving on speed (how can you deliver more content than the outbound connection can carry??). this is why the in-kernel http servers went nowhere. in any case most people use CDNs these days for static content.

note that by not using apache you give up a lot of security hardening, add-on-modules, and mindshare that nginx does not have.

Re: Nginx vs Apache performance

#24
post #20

My understanding is that Nginx is the server of choice for static content and Lighttpd for dynamic content (particularly FastCGI). Is that still the latest and greatest advice? I've found Lighttpd way easier to configure than Apache and am having it serve my static content simply because we don't need to worry about every little bit of performance just yet.

We just use an http load balancer (haproxy) and have the app servers talk http directly. No need for a web server, which makes things much more stable. We use nginx for static content though (haproxy points at nginx for the static content).

How do you do process management? Do you have a static or dynamic number of app server processes/threads?

Re: Nginx vs Apache performance

#27

One of the things about nginx is the lack of an organised community - for e.g. there is not even an official repository for nginx ( http://marc.info/?l=nginx&m=122153991029203&w=2 ). there are simply some mirrors of people who maintain a patch-based tree ( http://mdounin.ru/hg/nginx-vendor-current ). There is no bug-tracker (!!), just a wiki page ( http://wiki.nginx.org//NginxBugs ) and as someone mentioned ( http://…

i think much of this is due to the language barrier, and also due to the ease of use (and ease of writing nginx modules)...

Re: Nginx vs Apache performance

#28

apache is perfectly capable of saturating the outbound connection on static content on any reasonable setup. you may save a little on memory with nginx but you aren't saving on speed (how can you deliver more content than the outbound connection can carry??). this is why the in-kernel http servers went nowhere. in any case most people use CDNs these days for static content. note that by not using apache you give up a…

No, in-kernel http servers went nowhere because of sendfile(2)

Re: Nginx vs Apache performance

#29

apache is perfectly capable of saturating the outbound connection on static content on any reasonable setup. you may save a little on memory with nginx but you aren't saving on speed (how can you deliver more content than the outbound connection can carry??). this is why the in-kernel http servers went nowhere. in any case most people use CDNs these days for static content. note that by not using apache you give up a…

For a very tight virtual server config I can see the use for nginx, but for a normal server, running just apache, memory is not going to be an issue. There are probably other limits that will affect performance, such as the connection just as you say.

For example I tried running a server with apache + passenger on an ec2 node, bumped up the MaxClients to 1024. I evened out at around 400 simulaneous connections. Maybe it was due to some mysql limit or limits from the placed I sent the load from, but I was consuming around 50% cpu, so there seemed to be some other thing.

Re: Nginx vs Apache performance

#30
post #14

Earlier quoted context omitted.

Am I misunderstanding something, or is Phusion essentially just a slightly better FastCGI? It does some magic sharing of read-only segments of memory by taking advantage of copy-on-write and a special version of Ruby, but other than that it seems like it does the exact same thing as FastCGI.

...is Phusion essentially just a slightly better FastCGI? Well, it depends on whether you're looking at it from an academic or practical standpoint. AFAIK the technologies are not entirely dissimilar, as you suggest, but there are notable differences once you actually put them into use. I've used both for running rails apps, and a few things stand out for me: 1. Passenger is much easier to set up: it took me about 5…

Yeah, the integrated monitoring in passenger really simplifies rails deployment a lot. It was always very tricky to shepherd the mongrels.
Post reply on HN