Zeroserve is a lightweight HTTPS server that uses eBPF programs as its configuration layer, serving websites from a single tarball with built-in TLS 1.3 and HTTP/2 support. The open-source project handles static files, dynamic scripting, and reverse proxying without traditional configuration files, with benchmark results showing it outperforms nginx on small file serving by approximately 17%.
eBPF Programs Replace Traditional Configuration Files
The core innovation of Zeroserve is using eBPF programs as the configuration mechanism. As creator losfair explains, "The eBPF program is the configuration—a single, ordinary, sandboxed program that sees every request and decides what happens." The eBPF scripts run entirely in userspace, JIT-compiled to native x86-64 code through the async-ebpf runtime. A "pointer cage" mechanism sandboxes memory access, while preemption timers prevent runaway scripts from blocking other requests.
Performance Benchmarks Show Advantages Over Nginx
Benchmark results demonstrate Zeroserve's performance characteristics:
- Small static files (174 bytes): 36,681 req/s vs nginx's 31,226 req/s
- Large files (100 KB): 8,000 req/s delivering 782 MB/s throughput
- eBPF scripting: Outperforms nginx Lua by approximately 50% on middleware tasks when tuned to 10ms intervals
- Memory usage: Approximately 15 MB per instance
Architecture Features Tarball Deployment and io_uring Throughout
Zeroserve supports tarball deployment with atomic hot-reload via SIGHUP signal, enabling zero-downtime updates. The system uses io_uring throughout for all I/O operations, maximizing performance on modern Linux kernels. The single-threaded design uses one event loop per process, scaling through multiple processes rather than thread pooling.
The rich helper API provides request inspection, cryptographic functions (SHA-256, HMAC), JSON parsing, rate limiting, AWS SigV4, and OIDC login flows—all accessible from eBPF scripts. This allows complex request handling logic to be expressed in the same eBPF programs that serve as configuration.
Open Source Release Co-Authored With AI Models
The project documentation, published June 6, 2026, includes a disclaimer that it was "co-authored with GPT-5.5 and Claude Opus 4.8." The open-source project reached the Hacker News front page with 183 points and 45 comments, indicating strong community interest in the eBPF-based configuration approach.
Key Takeaways
- Zeroserve uses eBPF programs as configuration, with scripts JIT-compiled to native x86-64 code in userspace
- Benchmark results show 36,681 req/s for small files (174 bytes) compared to nginx's 31,226 req/s, a 17% improvement
- The system uses io_uring throughout and features tarball deployment with atomic hot-reload via SIGHUP
- Memory footprint is approximately 15 MB per instance with a single-threaded event loop design
- eBPF scripting outperforms nginx Lua by approximately 50% on middleware tasks