Reverse proxy gateway with rate limiting (token bucket + Redis), circuit breakers, retry with exponential backoff, API key auth, and Prometheus metrics. Written in Go.
cp .env.example .env
make run # or: make docker-upRequires Redis 7+ for rate limiting and API key storage.
| Variable | Default | Notes |
|---|---|---|
PORT |
8081 |
Gateway port |
RATE_LIMIT_RPM |
60 |
Requests/minute per client |
CB_MAX_FAILURES |
5 |
Failures before circuit opens |
CB_RESET_TIMEOUT_SECONDS |
30 |
Open → half-open delay |
RETRY_MAX_RETRIES |
3 |
Max retry attempts |
ADMIN_AUTH_ENABLED |
true |
Basic auth on /admin/* |
See .env.example for the full list.
Management: /health, /info, /metrics, /services/health
Admin (Basic Auth): /admin/apikeys (CRUD), /admin/circuit-breakers (stats + reset)
Proxy: everything else routes to backends by path prefix (/api/auth/* → auth-service, /api/users/* → user-service).
go test ./...MIT