Hi
Is there a way to add custom response headers to requests that are
being rate limited?
Specifically, we'd like to add headers akin to Twitter's
"x-rate-limit-limit", "x-rate-limit-remaining", and
"x-rate-limit-reset" [1].
The rls.proto does not provide any mechanism to support this since it
only allows many DescriptorStatus objects. If the RL service (or
rlds) supported returning custom key-value pairs that'd be great.
The DescriptorStatus is
message DescriptorStatus {
// The response code for an individual descriptor.
Code code = 1;
// The current limit as configured by the server. Useful for debugging, etc.
RateLimit current_limit = 2;
// The limit remaining in the current time unit.
uint32 limit_remaining = 3;
}
[1]:
https://developer.twitter.com/en/docs/basics/rate-limiting
Thanks
Vijay