Project
REST Router
A lightweight reactive API gateway on Spring WebFlux with identity-aware rate limiting, pluggable auth, asynchronous access logging, and a dynamic service registry.
REST Router is a small reactive API gateway — enough of the features of a commercial gateway to be useful, small enough to read in an afternoon.
What it does
-
Identity-aware rate limiting — token buckets keyed by the authenticated principal, held in Redis so limits apply across any number of instances.
-
Pluggable auth — API keys by default, with an interface for JWT, OAuth, or anything else.
-
Asynchronous access logging — a bounded queue with Kafka, stdout JSON, file, or no-op sinks; deliberately lossy under back-pressure, with drop counters exposed as metrics.
-
Dynamic service registry — add, remove, and edit services through an admin API without restarting.
-
Weighted and header-based routing, pre- and post-request plugins, Micrometer and Prometheus metrics, and request-id propagation.
How it is built
Spring WebFlux on Project Reactor: an API-key filter resolves the principal, an admin filter
guards /admin, and the router handler applies routing and a Redis Lua rate limiter before
forwarding and logging. It ships with a Dockerfile, a Docker Compose stack (gateway, Redis,
Kafka, Prometheus, Grafana, and mock back ends), and Kubernetes manifests.