A high-performance, horizontally scalable Server-Sent Events proxy built in Zig for real-time event streaming at scale.
RevenProx delivers SSE connections to millions of concurrent clients with JWT authentication, distributed state synchronization via NNG mesh topology, and topic-based message routing.
- Massive Scale - Designed for 10M+ concurrent connections across 100+ proxy instances
- Brokerless Architecture - No central message broker; fully distributed using NNG mesh
- Topic-Based Routing - UUID-based topics for efficient, targeted event delivery
- JWT Authentication - Secure webhook-based token verification with caching and circuit breaker
- Built in Zig - Maximum performance with minimal memory footprint
- Production Ready - Rate limiting, connection pooling, graceful shutdown, observability
- Linux (kernel 4.x+)
- Zig 0.15.1+
- NNG library (libnng-dev)
# Clone the repository
git clone https://github.com/dotcommoners/revenprox.git
cd revenprox
# Install dependencies and build
./install.sh
# Or build manually
zig build -Doptimize=ReleaseSafe# Start with default configuration
./zig-out/bin/sse-proxy --config config/proxy.toml# Subscribe to events on a topic
curl -N "http://localhost:8080/events/my-topic" \
-H "Authorization: Bearer <jwt-token>"┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ HTTP Server │ │ Connection Pool │ │ JWT Verifier │
│ (SSE Endpoint)│ │ Management │ │ (Webhook) │
└─────────┬───────┘ └─────────┬───────┘ └─────────┬───────┘
│ │ │
└──────────────────────┼──────────────────────┘
│
┌────────────┴────────────┐
│ Distributed State │
│ (Bloom + Merkle + Vector)│
└────────────┬────────────┘
│
┌────────────┴────────────┐
│ NNG Topic Router │
│ (PUB/SUB with topics) │
└─────────────────────────┘
RevenProx has two documentation sets for different audiences:
| Documentation | Location | Audience | Description |
|---|---|---|---|
| User Guide | documentation/ |
Operators & Developers | Installation, configuration, API reference, deployment guides |
| Technical Specs | docs/ |
Contributors | Internal architecture, protocols, component specifications |
The user-facing documentation covers everything needed to deploy and operate RevenProx:
To serve the documentation locally:
cd documentation && mkdocs serveThe internal documentation provides deep technical details for contributors:
- Component Specifications - HTTP server, connection pool, JWT verifier, etc.
- Protocol Specifications - SSE, NNG mesh, gossip protocols
- Deployment Specifications - Container, Kubernetes, monitoring
RevenProx uses TOML configuration:
proxy_id = "proxy-1"
log_level = "info"
[http]
bind_address = "0.0.0.0:8080"
max_connections = 10000
[jwt_verifier]
webhook_url = "http://auth-server/verify"
require_authentication = true
[limits]
max_memory_mb = 1024See Configuration Overview for all options.
# Build the image
docker build -t revenprox:latest .
# Run with Docker Compose
docker-compose upRevenProx is under active development. Core infrastructure is implemented and functional. See the documentation for current capabilities and roadmap.
Contributions are welcome. Please review the technical specifications before submitting changes.
MIT License - see LICENSE for details.