News for hackers. Stuff that matters.
Re:Althttpd: Simple webserver in a single C file by terminalserver on Tuesday June 08, 2021 @04:52AM (#27432012)
Interesting but why? There’s a bazillion web servers out there, surely one of them can do the job?

What have I missed?

Re:Althttpd: Simple webserver in a single C file by OJFord on Tuesday June 08, 2021 @05:04AM (#27432089)
> [Althttpd ...] has run the https://sqlite.org/ website since 2004

I don't know what the landscape was like in 2004 really, but probably at least an order of magnitude less than today's bazillion (whatever that would be!).

Re:Althttpd: Simple webserver in a single C file by aembleton on Tuesday June 08, 2021 @07:03AM (#27433445)
I don't think Nginx was out then, so I was using Apache HTTPD. Maybe Dwayne considered that too heavy for what he needed to serve up.
Re:Althttpd: Simple webserver in a single C file by unwind on Tuesday June 08, 2021 @07:26AM (#27433664)
Nginx was first released to the public in 2004 [1]. Apache was released in 1995 [2].

On a more personal note, wow! I had no idea I started using the Internet for realz before the release of Apache, in 1994. This young made me feel, not.

[1]: https://en.wikipedia.org/wiki/Nginx

[2]: https://en.wikipedia.org/wiki/Apache_HTTP_Server

Re:Althttpd: Simple webserver in a single C file by c17r on Tuesday June 08, 2021 @07:37AM (#27433773)
Nginx’s first public release was Oct 2004, so fits with your theory.
Re:Althttpd: Simple webserver in a single C file by squiggleblaz on Tuesday June 08, 2021 @05:30AM (#27432215)
I don't know of any other well-known web server with the same featureset. For instance, it has no configuration file, it's run from xinetd statelessly/single-threaded, it runs itself in a chroot and it's short enough to be readable without specific effort.

It also isn't brand new: it's been around since 2004. So that probably narrows the range of possible competitors even more.

If you can find a webserver that meets all of those constraints, please let us know.

Re:Althttpd: Simple webserver in a single C file by rkeene2 on Tuesday June 08, 2021 @08:53AM (#27434481)
filed [0] is written to be readable, and stateless, and runs from a chroot, and has no configuration file. It doesn't run from xinetd and it's multi-threaded, though.

I wrote it because no other web server could serve files fast enough on my system (not lighttpd, not nginx, not Apache httpd, not thttpd) to keep movies from buffering.

[0] https://filed.rkeene.org/

Re:Althttpd: Simple webserver in a single C file by e12e on Tuesday June 08, 2021 @01:44PM (#27438418)
> I wrote it because no other web server could serve files fast enough on my system (not lighttpd, not nginx, not Apache httpd, not thttpd) to keep movies from buffering.

Could you expand on that? What type of files, how many clients? I seem to recall plain apache2 from spinning rust streaming fine to vlc over lan - but last time I did that was before HD was much of a thing... Now I seem to stream 4k hdr over ZeroTierOne over the Internet to my Nvidia Shield via just DLNA/UpNP (still to vlc) just fine. But I'm considering moving to caddy and/or http/webdav - as a reasonable web server with support for range request seem to handle skipping in the stream much better.

Re:Althttpd: Simple webserver in a single C file by rkeene2 on Tuesday June 08, 2021 @02:42PM (#27439165)
You might want to try filed !

This was for serving MPEG4-TS files with, IIRC, H.264 video and MPEG-III audio streams -- nothing fancy -- from a server running a container living on a disk attached via USB/1.1.

While USB/1.1 has enough bandwidth to stream the video, the other HTTP servers were too slow with Range requests, because they would do things like wait for logs to complete and open the file to serve (which is synchronous and requires walking the slow disk tree).

Re:Althttpd: Simple webserver in a single C file by e12e on Tuesday June 08, 2021 @04:16PM (#27440191)
> a server running a container living on a disk attached via USB/1.1.

Ah, ok. That makes sense. USB 1.1 can certainly challenge cache layers and software assumptions.

I do wonder how far apache2 might have been pushed, dropping logs and adjusting proxy/cache settings.

Re:Althttpd: Simple webserver in a single C file by rkeene2 on Tuesday June 08, 2021 @05:42PM (#27441280)
I do not know, though I do know that just disabling logging wasn't sufficient.
Re:Althttpd: Simple webserver in a single C file by fraktl on Tuesday June 08, 2021 @04:58AM (#27432057)
You missed the date in the comment of the C file: 2001-09-15

Back then, there weren't bazillion web servers out there. A patchy server was still.. patchy. And engine that solves problem X (c10k) was not created yet :)

(for whoever reads my comment, I am referring to Apache and nginx)

Re:Althttpd: Simple webserver in a single C file by mro_name on Tuesday June 08, 2021 @04:55AM (#27432040)
dependency awareness. External stuff bears surprises. Not everybody feels comfortable with that.
Re:Althttpd: Simple webserver in a single C file by terminalserver on Tuesday June 08, 2021 @04:57AM (#27432055)
There’s plenty of lightweight minimal web servers with minimal dependencies.

But hang on is dependency anxiety really the reason or did you just make that up?

Re:Althttpd: Simple webserver in a single C file by mro_name on Tuesday June 08, 2021 @05:12AM (#27432131)
no, not made up – selfmade is even less dependencies than a 3rd party without other deps. And minimalis more than zero, still.
Re:Althttpd: Simple webserver in a single C file by nix23 on Tuesday June 08, 2021 @06:17AM (#27432751)
>There’s plenty of lightweight minimal web servers with minimal dependencies.

In 2001?

Re:Althttpd: Simple webserver in a single C file by TZubiri on Tuesday June 08, 2021 @08:30AM (#27434251)
Simplicity