Earlier quoted context omitted.
It's a simple format easily suitable for accessing resources by byte ranges, that everyone has tooling for, and which _doesn't_ compress things.
It would be interesting to extend it to zip, which is what redbean/greenbean use to serve static assets. Back in school, I worked on a project called Velox, with a partner - the idea was to take a bz2-compressed dump of the giant XML export of wikipedia, and write a program to serve that copy of wikipedia from disk (this was in 2008-2010? in my master's program, so before Kiwix and the amazing zim dumps they produce)…
Zeroserve: A zero-config web server you can script with eBPF
51–60 of 69 posts
Re: Zeroserve: A zero-config web server you can script with eBPF
#52Earlier quoted context omitted.
It's a simple format easily suitable for accessing resources by byte ranges, that everyone has tooling for, and which _doesn't_ compress things.
It would be interesting to extend it to zip, which is what redbean/greenbean use to serve static assets. Back in school, I worked on a project called Velox, with a partner - the idea was to take a bz2-compressed dump of the giant XML export of wikipedia, and write a program to serve that copy of wikipedia from disk (this was in 2008-2010? in my master's program, so before Kiwix and the amazing zim dumps they produce)…
The more interesting trick you can do with zip files for HTTP serving is to serve the compressed deflate stream as gzip, or use Zstd inside zip. Then you have a valid zip file from which bytes can be served directly.
I have some code which does this at https://git.sr.ht/~dgl/deserve/
Re: Zeroserve: A zero-config web server you can script with eBPF
#53I like the idea. I think I'd feel more comfortable if I could drop an .rs file into the eBPF dir instead of a .c one. It's already a Rust project! :) And for some reason I was expecting this to be a kernel-accelerated webserver - if that could be done safely using eBPF that would be amazing! Also, single-threaded? Forking and sharing an incoming connection queue is basically trivial on Linux, that should be literally…
Hi, thanks! Will implement forking + SO_REUSEPORT. I've been using nftables for things like this so haven't needed it for myself yet :)
Re: Zeroserve: A zero-config web server you can script with eBPF
#54Very interesting idea and thanks for the no bs benchmarks! I wonder if this architecture could be ported to webservers with dynamic content/logic, too.
Re: Zeroserve: A zero-config web server you can script with eBPF
#55I love seeing stuff like this that would probably not exist if not for LLMs making exploring these kinds of ideas relatively cheap and quick to do. My takeaway from this though is that nginx is pretty impressive on its own. Also this stuck out: It's meant to be an alternative to nginx and Caddy, and the design bet is about configuration. Those servers give you a declarative config language - location blocks, rewrite…
I'd wager that in the next 96 hours, with a LLM, someone could create a translator that would 'pack' a nginx or caddy configuration file into the relevant code that zeroserve could use. Or even more simply, just pickup all the Ingress manifests in a kubernetes cluster and rebuild the pack. The point being, the interface between the tool and the configuration is just another API, system operators are already describin…
Re: Zeroserve: A zero-config web server you can script with eBPF
#56The death of the techempower web server benchmarks means new ones like this one no longer have the chance to prove themselves. Edit: it seems I'm just falling behind and the new hotness is https://www.http-arena.com/leaderboard/ . Good luck!
What do you mean it's dead? It's up at: https://www.techempower.com/benchmarks/#section=data-r23 with the last benchmark having been in February 2025, but they don't run their benchmarks that often, only once a year or less as its rounds history indicates.
Sunsetting the Techempower Framework Benchmarks
Re: Zeroserve: A zero-config web server you can script with eBPF
#57Earlier quoted context omitted.
Depends on the domain. There's a bunch of sciences using large datasets served up efficiently using static file formats, e.g., https://zarr.dev/ and https://parquet.apache.org/
Admit I'm not familiar with that domain. But don't people use managed services even there? In my job we host parquet files on S3.
Re: Zeroserve: A zero-config web server you can script with eBPF
#58Unfortunately, Caddy seems to take less concern on this.
Zeroserve already beats Nginx in performance. Hopefully someday it would catch up to Caddy's features.
Re: Zeroserve: A zero-config web server you can script with eBPF
#59I like the idea. I think I'd feel more comfortable if I could drop an .rs file into the eBPF dir instead of a .c one. It's already a Rust project! :) And for some reason I was expecting this to be a kernel-accelerated webserver - if that could be done safely using eBPF that would be amazing! Also, single-threaded? Forking and sharing an incoming connection queue is basically trivial on Linux, that should be literally…
https://github.com/tekacs/zeroserve/commit/b33f261615d20d55b...
It does leave me wondering about other runtimes that could be used as the go-between though, because at the point of compiling Rust, an approach like Cloudflare's Pingora (https://github.com/cloudflare/pingora) which I've tried using before... in _theory_ should be a 'nicer' solution - just historically awkward when I've tried using it the way that I'd have liked. Wish it were more library-shaped!
Re: Zeroserve: A zero-config web server you can script with eBPF
#60OT, Another benchmarks showing Caddy not performing on par with Nginx. And the difference aren't so either, roughly 2.5x in small asset serving at nearly 3x latency. On normal 100KB static files it is 20% less throughput but most importantly nearly double the latency. Unfortunately, Caddy seems to take less concern on this. Zeroserve already beats Nginx in performance. Hopefully someday it would catch up to Caddy's f…
You don't serve up a bazillion js files and care about latency. You also don't serve up files from all over the web (fonts from google, jquery or whatever from their site) unless you don't care about having control over your own latency.
A static HTML page renders in under 20ms for me these days, if the site is near. Some of these pages with immense blather of js take > 10 seconds to fully download and render. So... in that world, who cares if it's 5 seconds or 6 seconds?