Page MenuHomePhabricator

Client Developer gets rate limit headers
Open, HighPublic

Description

"As a Client Developer, I want to have informational HTTP headers in my response that say what my rate limit is and how many requests I still have available, so that I can throttle my requests to avoid going over the limit."

Different services use different proprietary headers for rate-limit information. We can use those, define our own, or use the draft RFC for rate-limit headers from the IETF.

Note that this is for successful and error messages.

This is done when:

  • Our responses follow the RFC for rate limit headers
  • Every response has rate limit in the headers (somewhere) or we know why not
  • Every response has remaining calls in the headers (somewhere) or we know why not
  • Every response has reset time in the headers (somewhere) or we know why not

Event Timeline

eprodromou updated the task description. (Show Details)
eprodromou triaged this task as High priority.Jun 19 2020, 4:26 PM
eprodromou added subscribers: hnowlan, Pchelolo.

It would be great to get some information on what these headers are going to be.

@Pchelolo and @hnowlan do we have an idea what the headers are that come out of the Envoy rate-limiting implementation?

Pchelolo added a comment.EditedJul 29 2020, 3:58 PM

I thought envoy was supporting this out of the box, but apparently it does not :( We need to make an upstream contribution one more time.

Filed https://github.com/envoyproxy/envoy/issues/12356 and awaiting approval from envoy maintainers.

eprodromou updated the task description. (Show Details)
eprodromou updated the task description. (Show Details)

The first in the series of patches needed for this has been merged upstream.

Now we need to wait for either of the following before continuing the work:
a) new version of https://github.com/envoyproxy/go-control-plane to be released, so that upstream ratelimit service could be updated to support X-RateLimit-Reset header
b) new version of envoy to be cut and used in the gateway

Naike added a subscriber: Naike.Aug 10 2020, 4:55 AM

@Pchelolo: What's the release plan for Option A? When would a new version of Envoy be cut and used in the Gateway? I'd like to get a better sense of when we'll be able to remove this blocker. Are there any workarounds?

@Pchelolo: What's the release plan for Option A? When would a new version of Envoy be cut and used in the Gateway? I'd like to get a better sense of when we'll be able to remove this blocker.

According to this in the end of September.

Are there any workarounds?

No. This is an unimportant feature and we definitely shouldn't invest any more time into thinking about it then we already did.

WDoranWMF added a subscriber: WDoranWMF.