RevenProx SSE Proxy
A high-performance, production-ready Server-Sent Events (SSE) proxy built in Zig. RevenProx provides real-time event streaming with JWT authentication, distributed state synchronization, and horizontal scaling capabilities.
Features
- High Performance: Built in Zig for maximum performance with minimal memory footprint
- JWT Authentication: Secure webhook-based JWT verification with caching and circuit breaker
- Topic-Based Routing: Subscribe clients to specific topics for targeted event delivery
- Distributed State: Synchronize subscriptions across multiple proxy instances using NNG
- Rate Limiting: Per-IP rate limiting to protect against abuse
- Connection Pooling: Efficient connection management with configurable limits
- Production Ready: Comprehensive configuration validation, graceful shutdown, and monitoring
Quick Example
# Start the proxy
./sse-proxy --config config/proxy.toml
# Connect a client to a topic
curl -N "http://localhost:8080/events/my-topic" \
-H "Authorization: Bearer <jwt-token>"
Use Cases
- Real-time Notifications: Push notifications to web and mobile clients
- Live Updates: Stream data changes to connected clients
- Event Broadcasting: Distribute events to multiple subscribers
- Microservices Events: Connect services via event-driven architecture
Architecture Overview
┌─────────────────┐
│ JWT Webhook │
│ Server │
└────────▲────────┘
│ verify
┌──────────┐ SSE ┌────┴────────────┐ NNG ┌──────────┐
│ Client │◄──────────►│ RevenProx │◄──────────►│ Peer │
│ │ │ SSE Proxy │ │ Proxy │
└──────────┘ └─────────────────┘ └──────────┘
Getting Started
- Installation - Install RevenProx
- Quick Start - Run your first proxy
- Basic Concepts - Understand core concepts
Documentation
| Section | Description |
|---|---|
| Configuration | Configure the proxy for your environment |
| API Reference | SSE endpoints and authentication |
| Operations | Deploy and monitor in production |
| Architecture | Technical deep-dive |
Requirements
- Linux (kernel 4.x+)
- libnng-dev (NNG messaging library)
- Zig 0.15+ (for building from source)
License
RevenProx is open source software licensed under the MIT license.