Closed guzi99 closed 2 years ago
@guzi99 Already fixed in #80
RateLimit-Limit
and RateLimit-Reset
are REQUIRED;RateLimit-Remaining
is RECOMMENDED.Can you please close if that fixes?
@ioggstream sorry for missing the previous conversation. My take is
To summarize my opinion - RateLimit-Reset is required when RateLimit-Remaining is specified; otherwise, RateLimit-Reset is optional.
Thoughts?
@guzi99
RateLimit-Limit alone can be useful for clients. It tells the complete rate-quota ...
By design, RateLimit-Limit quota-policies are OPTIONAL and not actionable.
The only actionable value of RateLimit-Limit is expiring-limit
that is the first value.
RateLimit-Reset can be optional
Without RateLimit-Reset, you cannot identify the current time-window because quota-policy are not actionable. In the above case, the correct response is
RateLimit-Limit: 10000, 10000;w=300
RateLimit-Reset: 300
problem is when RateLimit-Remaining appears without RateLimit-Reset
This is the reason why RateLimit-Reset is REQUIRED
Thanks for closing @guzi99 !
Feel free to provide further feedback since it's useful to double check the specs!
@guzi99 wdyt on #79? Do you think it could better clarify that quota-policies are optional?
Thx++, R
I do agree that having both limit number and policies in the same field is a bit confusing. That is the reason I thought RateLimit-Limit could be actionable, but now I get that the policy is optional.
Just look at this example you provided: RateLimit-Limit: 10000, 10000;w=300 RateLimit-Reset: 300
It seems to have duplicated information. I do understand the benefit of the extensibility in the Limit field, but it could get too complex too soon for clients to consume.
It seems that it is not required to return all these 3 fields together. However, I was wondering if certain combinations would cause confusion.
For example, if a server return RateLimit-Limit, RateLimit-Remaining but not RateLimit-Reset, such as:
RateLimit-Limit: 10000, 10000;w=300 RateLimit-Remaining: 900
How would clients interpret the RateLimit-Remaining field without the RateLimit-Reset?