envoyproxy / envoyproxy/ratelimit

Way to create different time units?

Offen
#190 22 Kommentare 18 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
help wanted
Vorherrschende Sprache
Go
Sterne
2.7k
Forks
535
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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`?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.