4 ms·
What's wrong with nginx?
by halayli 12y ago
What's wrong with nginx?
- nacs 12y agoNothing wrong with nginx but thttpd/sthttpd is a far smaller server purely for static files. It runs on more platforms and uses a tiny amount of memory. It also predates nginx so there's probably some legacy sites that are still using it.
- halayli 12y agonginx memory footprint is very small, and does an excellent job serving static files. It's widespread usage helps in uncovering security bugs faster too.
- nacs 12y agoI'm not endorsing thttpd/sthttpd over nginx on modern systems and I actually do use nginx pretty much everywhere but thttpd has its uses. Over a decade ago, I have used thttpd to serve static files as: 1) nginx didn't exist 2) thttpd is tiny (thttpd binary size is ~50KB vs nginx's ~2.8MB) which is good on embedded or very old hardware for example. 3) Memory footprint of thttpd is around 10KB. nginx doesn't even come close
- currysausage 12y agoWhat point are you trying to make? That because of the existence of Nginx, every other HTTP server project should be abandoned? Nginx certainly is some kick-ass piece of software, but as every other software, it doesn't suit 100% of users 100%. There are valid reasons to choose different HTTP servers over Nginx, as people in this thread already pointed out. To give another example, the OpenBSD project, famously obsessed about code quality, recently removed Nginx from the base system, not least because they think its code is "über-optimized," possibly eliminating OS-level security mechanisms. [1] This doesn't mean that the code bad, but some people prefer "tiny" and clearly-written codebases that can be audited in reasonable time. thttpd, in particular, seems to hold the balance between code size and performance very well, which makes it a nice choice for embedded systems. [1] <http://undeadly.org/cgi?action=article&sid=20140827065755&pid=24&mode=expanded> http://undeadly.org/cgi?action=article&sid=20140827065755&pi...
- e12e 12y ago> purely for static files While I do see the need for both small and big servers, this one has support for cgi, and via cgi ssi -- so it's not entirely accurate to say "purely for static files" (as far as I can tell, there's no easy way to completely remove cgi support via the ./configure script -- I could be wrong). As others have mentioned, openbsd transitioned to a new httpd based off of relayd. Not sure if/how one might compile that for Linux -- I'm not familiar enough with how openbsd organizes its code. I figured out one could get the relevant source with: cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs get src/usr.sbin/httpd/ but as far as I can tell, there is no support for any OSs other than openbsd at this time. I'd love to be wrong, but "httpd" (where "httpd" is supposed to be not apache httpd, but new openbsd httpd, which as far as I can tell, is just called, "httpd") isn't very easy to search for... Anyway, openbsd httpd has support for fast-cgi -- so a truly simple server, would be something like: http://unix4lyfe.org/darkhttpd/ http://unix4lyfe.org/darkhttpd/
- kolev 12y agoThere are many things that are now wrong with Nginx, but none of them are addressed by sthttpd, unfortunately.