Bentheburrito / radio_beam

A WIP Matrix homeserver, powered by the BEAM
GNU Affero General Public License v3.0
1 stars 0 forks source link

Rate Limiting #7

Open Bentheburrito opened 1 month ago

Bentheburrito commented 1 month ago

Initial implement of per-endpoint rate limits.

Endpoints that do not require authentication should have a reasonable global limit (fixed/sliding window). Authenticated endpoints should rate limit on a per-user basis (possibly with an additional, much higher global rate limit). The exact rate limit will differ depending on the expected use (e.g. …client/v3/rooms/{roomId}/send/… will have a higher limit compared to …/client/v3/login).

A process-only approach is probably reasonable to start (don't need to persist users' current progress towards a limit). All rate limits should be configurable