CODESEEDSign in
Explore projects
TypeScriptadvancedweb

Distributed Rate Limiter as a Service

Distributed HTTP rate limiting service with sliding window algorithm, Redis backend, TypeScript SDK, and metrics dashboard.

5 steps

Project steps

  1. 01

    Sliding window Redis

    Implement the sliding window algorithm with sorted sets in Redis.

  2. 02

    HTTP API Fastify

    POST /check endpoint: {key, limit, window} → {allowed, remaining, resetAt}.

  3. 03

    SDK TypeScript

    Publish an npm package with a type-safe client and retry logic.

  4. 04

    Multi-tenancy

    Isolate limits per API key with Redis namespaces.

  5. 05

    Prometheus Metrics

    Expose /metrics with counters per key, p99 latency, rejected rate.

Recommended resources

Ready to build this?

Fork the repo on GitHub and start building. A mentor will review your code when you open a PR.

5 steps

Tech stack

Node.jsTypeScriptRedisFastifyPrometheusGrafana