Case study
PulseGate
Reactive API gateway on Spring WebFlux with distributed rate limiting.
At a glance
That made the problem part architecture and part failure safety. I built the gateway to protect downstream services before they became slow or unavailable, while still exposing enough state to see what was happening in real time.
The problem
API traffic is rarely uniform, and rate limits have to stay accurate when a request can land on any replica. A gateway that only checks local state can under-rate or over-rate traffic, which puts the system at the mercy of uneven request patterns.
For a reactive gateway, the deeper issue is that burst handling and dependency protection have to happen under concurrency without creating a slow path that amplifies downstream load.
What I built
- Atomic Redis Lua scripts for token-bucket, sliding-window, and fixed-window rate limiting across replicas.
- An adaptive circuit breaker that reduced pressure on slow or failing downstream services.
- A live WebSocket dashboard that surfaced gateway state and current conditions.
- Prometheus and Grafana metrics for traffic, failures, and rate-limit activity.
- Load testing with Artillery to validate behavior under higher traffic.
Architecture
Key decisions
Redis Lua scripts for rate limiting
Three rate-limit algorithms
Spring WebFlux for the gateway
Results
Load tested with Artillery.