skipper icon indicating copy to clipboard operation
skipper copied to clipboard

Add X-RateLimit-* headers

Open szuecs opened this issue 6 years ago • 5 comments

Follow up on https://github.com/zalando/skipper/issues/438

Other headers to consider besides X-Rate-Limit we already set:

  • X-RateLimit-Remaining
  • X-RateLimit-Reset

Behavior should be as documented at https://opensource.zalando.com/restful-api-guidelines/#153

See also https://developer.github.com/v3/#rate-limiting

Maybe better to move from X-RateLimit to https://ioggstream.github.io/draft-polli-ratelimit-headers/draft-polli-ratelimit-headers.html

szuecs avatar Aug 30 '19 07:08 szuecs

Hmm, difficult problem. I think the implementation should be consistent to the Zalando API Guidelines rule about Rate Limiting. We heavily try to stick to RFCs. The proposal currently does not have a registered RFC number. This makes it questionable to integrate its name changes. Thus I would stick to the X- names - or may be add a switch - two allow Zalando users to use the feature compatible with their existing API specifications.

However, we may anticipate the differences of the proposal by preparing some updates to our API Guidelines. Can you point out whether something of the proposal would conflict?

tkrop avatar Aug 30 '19 14:08 tkrop

@tkrop I changed the issue, thanks for pointing out

szuecs avatar Aug 30 '19 14:08 szuecs

@tkrop @whiskeysierra the I-D proposal is essentially the result of this discussion https://github.com/zalando/restful-api-guidelines/issues/379#issuecomment-392705421

It's fine to stick with the X- for now :) OTOH it would be great if Zalando could in some way support the proposal writing a comment here https://github.com/ioggstream/draft-polli-ratelimit-headers/issues/1

ioggstream avatar Jan 22 '20 15:01 ioggstream

Thanks @ioggstream , makes sense

szuecs avatar Jan 22 '20 15:01 szuecs

Update: the draft is now under the ietf umbrella, yet not RFC... draft-ietf-httpapi-ratelimit-headers feel free to review and support it to finalize the standardization

https://twitter.com/ioggstream/status/1340038502529024000?s=19

ioggstream avatar Dec 19 '20 23:12 ioggstream