Rate Limiting add custom response headers

224 views
Skip to first unread message

Vijay Lakshminarayanan

unread,
May 10, 2018, 6:14:57 AM5/10/18
to envoy...@googlegroups.com
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

Matt Klein

unread,
May 10, 2018, 11:15:59 AM5/10/18
to Vijay Lakshminarayanan, Envoy Users
This is not currently supported. Please open a feature request issue for tracking.

Vijay

--
You received this message because you are subscribed to the Google Groups "envoy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-users+unsubscribe@googlegroups.com.
To post to this group, send email to envoy...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-users/CALRoXF23eGZOkadCc5CMOoBjEkKK4N%2BKOETgivwPNX7LyRTmuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--

sureshk...@gmail.com

unread,
Jun 6, 2018, 3:38:00 AM6/6/18
to envoy-users
FYI, created issue to track this: https://github.com/envoyproxy/envoy/issues/3555
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-users...@googlegroups.com.

Vijay Lakshminarayanan

unread,
Jun 26, 2018, 6:55:20 AM6/26/18
to envoy-users, sureshk...@gmail.com
Hi Matt, Jose

Now that #3675 [1] has fixed #1034 (use data-plane-api's rate-limit
proto) [2], can we have a second look at #3555 (return custom headers
on rate limiting) [3]?

[1] https://github.com/envoyproxy/envoy/pull/3675
[2] https://github.com/envoyproxy/envoy/issues/1034
[3] https://github.com/envoyproxy/envoy/issues/3555

Thanks
Vijay
> https://groups.google.com/d/msgid/envoy-users/575f43b2-c8e7-4dc1-897a-ab3c6d466208%40googlegroups.com.

Vijay Lakshminarayanan

unread,
Aug 5, 2018, 3:00:32 AM8/5/18
to envoy...@googlegroups.com, sureshk...@gmail.com
Just an FYI to any that find this post. It has been addressed in
https://github.com/envoyproxy/envoy/pull/4015.

Thanks
Vijay

On Tue, Jun 26, 2018 at 4:25 PM Vijay Lakshminarayanan
Reply all
Reply to author
Forward
0 new messages