Skip to content

Implement API rate limits to prevent abuse #1725

Description

@odisseus

Motivation

Recently Scaladex has been receiving unusually many requests, which has caused unresponsiveness. These requests may come from legitimate users or AI assistants, but it may also be malicious scraper bots. Either way, there is a need to distribute server's resources fairly and evenly.

Identified Obstacles

The public API doesn't seem to have any authentication or rate limiting. Therefore, a carelessly written script can flood the server with requests completely by accident.

Implementation Guideline

I propose to implement rate limiting for the public API. An optional authentication by Github token may be worth considering.

Expectations

The rate limit would make accidental flooding very unlikely, and purposeful DoS attacks harder to orchestrate. Authenticated users could enjoy an increased rate limit; potentially it would be possible to identify the users which abuse the server.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions