Quickstart

Deploy RevenProx

In short

Build one static Zig binary, point each instance at its peers, and start streaming.RevenProx is self-hosted: instances form a brokerless NNG mesh, clients subscribe to UUID topics over ordinary SSE, and you scale by running more instances. Docker and Kubernetes deployment guides live in the documentation.

Build the binary

Clone the repo and build with Zig. The result is a single static binary — no runtime to install.

build
# 1 — clone and build a single static binary
git clone https://github.com/dotcommoners/revenprox.git
cd revenprox
zig build -Doptimize=ReleaseSafe
# → ./zig-out/bin/sse-proxy

Configure the mesh & auth

Give each instance its listen address, its NNG peers, and your webhook JWT endpoint. Caching and the circuit breaker protect that upstream under reconnect storms.

config/proxy.toml
# 2 — one instance in the mesh
[server]
listen      = "0.0.0.0:8080"
max_conns   = 2_000_000

[mesh]
peers       = ["rp-2:7000", "rp-3:7000"]

[auth]
webhook     = "https://auth.example.com/verify"
cache_ttl_s = 300
breaker     = true

Run an instance

Start the proxy with its config. It joins the mesh, peers with the other instances, and begins accepting SSE connections.

run
# 3 — run an instance (joins the mesh on start)
./zig-out/bin/sse-proxy --config config/proxy.toml
▸ mesh   peered rp-2, rp-3  (brokerless)
▸ ready  listening :8080

Subscribe a client

Clients speak ordinary SSE. Open an EventSource (or curl -N) against a UUID topic with a JWT and receive events as they are published — the mesh routes each event to just the right subscribers.

subscribe
# 4 — subscribe a client to a UUID topic (JWT-authenticated)
curl -N "http://localhost:8080/events/9f1c-a2" \
  -H "Authorization: Bearer <jwt>"

data: {"delta":"Hello"}
data: {"delta":" world"}

Scale out

Need more capacity? Run more instances. Each new node peers into the brokerless mesh, so throughput and connection capacity grow horizontally — there is no central broker to grow with them.

scale
# 5 — scale out: run more instances (Docker/K8s guides in docs)
docker run -p 8080:8080 -v $PWD/config:/config \
  ghcr.io/dotcommoners/revenprox --config /config/proxy.toml
# each replica peers into the mesh; add replicas to add capacity

Self-hosted, no control plane. RevenProx runs entirely on your infrastructure. The full build, configuration, and Docker/Kubernetes deployment guides are in the documentation, and the source is on GitHub.

What you get

The shape of a running deployment

A publish on any instance reaches every subscriber for that topic, across the fleet.

Publisherpublish(topic)rp-1rp-2rp-3Brokerless NNG meshclients · topic Aclients · topic B10M+ SSE conns

One publish, routed by UUID topic, fanned out to the right subscribers — no central broker.