Aegis
Distributed rate-limiting platform — Java 21 + Spring Boot + Redis with atomic Lua algorithms and a React control plane.
- Category
- Java 21
- Stack
- Java 21, Spring Boot, Redis, Lua, React
- Code
- GitHub ↗
- Live
- —
Overview
Aegis is a distributed rate-limiting platform — Java 21 and Spring Boot 3 backed by Redis 7 — implementing Token Bucket, Sliding Window Log, and Fixed Window Counter with atomic Lua scripts, so concurrent requests across multiple service instances share a single limiter state. It ships with a protected admin API, Prometheus/Grafana observability, and a React control-plane dashboard.
Atomic algorithms
Three algorithms — Token Bucket, Sliding Window Log, Fixed Window Counter — each a single Lua execution per decision, with no GET-then-SET races. A RateLimitFilter resolves the caller by X-API-Key, JWT subject, IP, or global scope; per-client config is cached through Caffeine plus Redis.
Control plane
A monochromatic React 18 + TypeScript dashboard (Vite, TanStack Query, Zod, Recharts, Playwright) shows live allowed/rejected traffic, rejection ratio, Redis latency and errors, with runtime rule management and a sandbox that exercises real limiter behavior.
Operations
A Docker Compose stack runs app + Redis + Prometheus + Grafana, with Actuator/Prometheus metrics, Swagger UI, and Testcontainers-backed integration tests. Redis stays on the internal network, never published to the host.
Built with
- Java 21
- Spring Boot
- Redis
- Lua
- React