Hacker News new | past | comments | ask | show | jobs | submit login
Sthttpd: Tiny and fast http server with a mature codebase (github.com/rmdir)
38 points by mariuz on Oct 4, 2014 | hide | past | favorite | 16 comments



Here's a tinier, also fast one: https://github.com/stealth/lophttpd


There also bozohttpd, which NetBSD uses, and the new httpd from OpenBSD, which is based on their relayd.


I imagine this is pronounced like the word "stupid". I'm not saying it is, but it's an amusing thought :)


I read it as "shtupped". It's Yiddish; look it up.


Github link, until blogs.gentoo.org gets back on its feet:

https://github.com/rmdir/sthttpd

"sthttpd is a fork of Jef Poskanzer's popular thttpd server. This fork aims to simply maintain the original codebase as bugs or security issues are found."


Thanks; we changed to that from http://blogs.gentoo.org/blueness/2014/10/03/sthttpd-a-very-t..., which is down.


The current repository (he's not using github anymore it seems):

http://opensource.dyc.edu/gitweb/?p=sthttpd.git;a=summary



stable and fast: http://monkey-project.com


What's wrong with nginx?


Nothing 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.


> 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/


nginx memory footprint is very small, and does an excellent job serving static files. It's widespread usage helps in uncovering security bugs faster too.


What 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&pi...


I'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


There are many things that are now wrong with Nginx, but none of them are addressed by sthttpd, unfortunately.




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

Search: