envoyproxy / envoyproxy/ratelimit

Way to create different time units?

Open
#190 22 comments 18 reactions 0 assignees View on GitHub
help wanted
Dominant language
Go
Stars
2.7k
Forks
535
PR merge metrics
No merged PRs in 30d

Description

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:

```yaml
rate_limit:
unit:
requests_per_unit:
```

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:

```yaml
rate_limit:
unit_multiplier:
unit:
requests_per_unit:
```

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.