Skip to content

Implement request rate limiting #372

@donaldp

Description

@donaldp

Description

Implement middleware for request rate limiting

Why

Rate limiting is essential for preventing abuse, protecting server resources, and ensuring fair usage among users. It helps mitigate DDoS attacks, reduces the risk of excessive API consumption, and improves overall application stability. By implementing a rate limiter, we can enforce request quotas, preventing any single user or client from overwhelming applications built with formidablejs

Possible Implementation & Open Questions

  • Use a middleware-based approach to intercept and monitor incoming requests.
  • Consider using in-memory stores like Redis for tracking request counts.
  • Consider using fastify-rate-limit since formidablejs uses Fastify under the hood.
  • Define rate limits based on IP address, API keys, or user authentication levels.
  • Allow configurable limits (e.g., X requests per minute) with dynamic adjustments for different routes.

Is this something you're interested in working on?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions