Hi Jason,
Yes this is the right place for your question.
If I understand your question correctly you want some guidance on how to set up multiple limits for a request, and have the ratelimit service return an OVER_LIMIT if any of the limits are hit.
This is possible you would send several descriptor sets per request so that you hit all the N limits you have setup. To use your example:
Ratelimit Config:
domain: requests_per_time_unit
descriptors:
- key: generic_key
value: req_per_second
descriptors:
- key: remote_address
rate_limit:
unit: second
requests_per_unit: 50
- key: generic_key
value: req_per_minute
descriptors:
- key: remote_address
rate_limit:
unit: minute
requests_per_unit: 500
- key: generic_key
value: req_per_hour
descriptors:
- key: remote_address
rate_limit:
unit: hour
requests_per_unit: 1500
And then for every request you would send:
RateLimitRequest:
domain: requests_per_time_unit
descriptor: ("generic_key", "req_per_second"),("remote_address", "<address>")
descriptor: ("generic_key", "req_per_minute"),("remote_address", "<address>")
descriptor: ("generic_key", "req_per_hour"),("remote_address", "<address>")
Which you can do by setting up the ratelimit actions on your ratelimit filter in envoy. More docs on that
here.
Then every request you send will be matched against all three limits, and the Ratelimit Response will come OVER_LIMIT if any of the three limits is over the limit.
Hope that helps,
Jose