Althttpd: Simple webserver in a single C file
1–10 of 345 posts
Re: Althttpd: Simple webserver in a single C file
#2Something I absolutely love about text based protocols such as HTTP/1 is how easy you can implement it in any virtually programming language. Sure, the implementation is not top-of-the-notch, but it just damned works, it is portable, it is understandable by humans. That's something what's got lost with HTTP/2 and HTTP/3, respectively.
Re: Althttpd: Simple webserver in a single C file
#3Caddy is just really awesome as a reverse proxy (2 line config!!) and I am in the processes of moving all my projects to it. It is fast enough as well since other things will be the bottle neck way before that.
I am not affiliated with Caddy in any way, just blown away by the quality of it.
Re: Althttpd: Simple webserver in a single C file
#4What have I missed?
Re: Althttpd: Simple webserver in a single C file
#5wow. Thanks also for elaborating the xinetd & stunnel4 configs.
Re: Althttpd: Simple webserver in a single C file
#6I'm all for SQLite and I am a fan of the author of the project but for a webserver I have turned my back away from Nginx for https://caddyserver.com/ because of the simplicity. Caddy is just really awesome as a reverse proxy (2 line config!!) and I am in the processes of moving all my projects to it. It is fast enough as well since other things will be the bottle neck way before that. I am not affiliated with Caddy i…
Re: Althttpd: Simple webserver in a single C file
#7Interesting 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
#8Interesting but why? There’s a bazillion web servers out there, surely one of them can do the job? What have I missed?
dependency awareness. External stuff bears surprises. Not everybody feels comfortable with that.
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
#9Interesting but why? There’s a bazillion web servers out there, surely one of them can do the job? What have I missed?
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
#10Here is the actual single C-code file: https://sqlite.org/althttpd/file?name=althttpd.c Something I absolutely love about text based protocols such as HTTP/1 is how easy you can implement it in any virtually programming language. Sure, the implementation is not top-of-the-notch, but it just damned works, it is portable, it is understandable by humans. That's something what's got lost with HTTP/2 and HTTP/3, respectiv…
Similarly, if you write a server that only speaks HTTP/1.1 (or HTTP/1.0 + Host header), you can put it behind a reverse proxy or load balancer that handles higher versions, does connection management, and terminates TLS. It will work perfectly fine, only without some of the latest performance optimizations that you might or might not even need.