Distributed Rate Limiter & API Gateway
A lightweight API gateway in Go that proxies requests to backend services while enforcing per-client rate limits shared across multiple gateway instances via Redis. Learners practice reverse proxying, distributed rate-limiting algorithms, and Redis integration.
- Estimate
- ~11.5h
- Steps
- 6
- Completed by
- 0
- Proposed by
- codeseed.app
Redis · net/http/httputil · go-redis
Project roadmap
- 01
Build the reverse proxy
~2hImplement a reverse proxy that forwards incoming requests to configured backend services.
- 02
Implement distributed rate limiting
~2.5hBuild a token-bucket rate limiter backed by Redis so limits are shared across gateway instances.
- 03
Add per-key limits
~1.5hSupport per-API-key rate limit configuration and expose limit headers in responses.
- 04
Add logging and metrics
~2hTrack requests per second and rejection counts, exposing them for monitoring.
- 05
Handle Redis failures
~2hFall back to a local in-memory limiter gracefully if Redis becomes unavailable.
- 06
Load test the gateway
~1.5hRun concurrent clients against multiple gateway instances to verify shared limits hold.
Resources
- DocsGo Documentation
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack