Distributed Rate Limiter
A distributed Go and Redis rate limiter with hierarchical quotas, exact concurrent enforcement, and a quota-leasing hot path benchmarked at 45.7 ns/op.
- Built a distributed rate limiter in Go and Redis with sliding-window and token-bucket algorithms, cost-weighted requests, and hierarchical user, tenant, and global quotas
- Reduced Redis round trips by approximately 80% for sustained hot keys through centrally accounted quota leasing; benchmarked the allocation-free lease path at 45.7 ns/op, approximately 1,900× faster than the recorded in-process Redis-backed path
- Verified exact enforcement under contention by admitting exactly 100 of 500 concurrent requests at a configured limit of 100; developed 131 tests and eight benchmarks with 86–96% coverage across core packages
- Built a GitHub Actions CI pipeline with race detection, real-Redis integration tests, linting, benchmarks, Docker smoke tests, and Prometheus/Grafana observability exercised through k6 load scenarios
