Skip to content

[Backend] — Per-Endpoint Rate Limit Tiers #1367

Description

@Olowodarey

Labels: backend, enhancement, auth, security

Problem

Rate limiting is uniform, so cheap read endpoints and expensive write endpoints share the same budget, either over-restricting reads or under-protecting writes.

Requirements

  1. Support configurable rate-limit tiers assignable per route.
  2. Apply distinct limits per authenticated user/API key and tier.
  3. Return standard rate-limit headers on responses.
  4. Make tier limits configurable via env/config.

Acceptance Criteria

  • Different routes enforce their assigned tier limits.
  • Rate-limit headers reflect remaining quota.
  • Limits are configurable without code changes.
  • Tests cover under-limit, at-limit, and over-limit behavior.

Files

backend/src/auth/rate-limit.service.ts, backend/src/common/guards, backend/src/config

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions