Skip to content

Way to create different time units? #190

Description

@vincentjames501

We'd like to implement rate limiting such that certain time-periods have time have different limits (i.e. bursting). For example:

Scenario Time-period (sec) Max allowed operations
Send to Conversation 1 5
Send to Conversation 30 60
Send to Conversation 300 100

Right now the configuration is pretty simple with:

rate_limit:
  unit: <second, minute, hour, day>
  requests_per_unit: <uint>

The problem is that I can't adjust the unit to be something like 30 seconds or 5 minutes (or at least I'm not clear how one would set that).

What would folks think about adding some unit multiplier such as:

rate_limit:
  unit_multiplier: <uint | default=1>
  unit: <second, minute, hour, day>
  requests_per_unit: <uint>

This would allow someone to easily express 30 seconds or 5 minutes?

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