HNHacker News
TopNewBestAskShowJobs

uppnrise

10 karma · joined February 2, 2021

submissionscomments
uppnrise··on Show HN: Production-ready rate limiter with Web Dashboard and 5 algorithms
Hi HN! Just released v1.2.0 of a distributed rate limiting service I've been building.

Key features:

• 5 rate limiting algorithms (Token Bucket, Sliding Window, Fixed Window, Leaky Bucket, Composite) • Redis backend for distributed state with atomic operations • New Web Dashboard for real-time monitoring • Geographic rate limiting with CDN support • REST API with 18 endpoints

Performance: 50K+ req/s, P95 < 2ms, ~100MB for 1M buckets

Built with Java 21 + Spring Boot. Includes comprehensive docs, client examples (Java/Python/Node/Go), Kubernetes manifests, and 265+ tests.

The Composite Rate Limiter is particularly interesting - it lets you combine multiple algorithms (e.g., API call limits + bandwidth limits) with configurable logic (AND, OR, weighted average, etc.).

Would love feedback on the implementation!

uppnrise··on Distributed Rate Limiter – Production-ready token bucket implementation
I built this after implementing rate limiting for the nth time and realizing there wasn't a good drop-in solution that balanced performance, operational simplicity, and developer experience.

Key characteristics: - 50,000+ RPS with <2ms P95 latency - Redis-backed token bucket algorithm with atomic Lua scripts - 18 REST endpoints for management, monitoring, and benchmarking - Automatic failover to in-memory backend (fail-open strategy) - Per-key and pattern-based configuration (user:, api:premium:)

What makes it different from existing solutions: - Production-first approach (complete K8s manifests, monitoring, runbooks) - Built-in load testing and performance regression detection - Comprehensive client examples in 5 languages - 265+ tests including concurrent and integration testing - Operational simplicity (single JAR, Docker, or K8s deployment)

The project documents architectural decisions in ADR format and includes everything needed for production deployment. MIT licensed.

Technical details and performance benchmarks in the README.

GitHub: https://github.com/uppnrise/distributed-rate-limiter