You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-ietf-httpapi-ratelimit-headers.md
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,16 +125,26 @@ This document uses the terms List, Item and Integer from {{Section 3 of !STRUCTU
125
125
Service Limit:
126
126
: A service limit is the currently remaining quota from a specific quota policy and, if defined, the remaining time before quota is reallocated.
127
127
128
+
List:
129
+
: A {{!STRUCTURED-FIELDS=RFC8941}} list of Items
130
+
131
+
Item:
132
+
: A {{!STRUCTURED-FIELDS=RFC8941}} item with a set of associated parameters
133
+
128
134
# RateLimit-Policy Field {#ratelimit-policy-field}
129
135
130
-
The "RateLimit-Policy" response header field is a non-empty List of Quota Policy Items ({{quotapolicy-item}}). The Item value MUST be a String. Its value is informative. The field value is expected to remain consistent over the lifetime of a connection. It is this characteristic that differentiates it from the [RateLimit](#ratelimit-field) field that contains information that may change on every request.
136
+
The "RateLimit-Policy" response header field is a non-empty List{{!RFC8941}} of Quota Policy Items ({{quotapolicy-item}}). The Item{{!RFC8941}} value MUST be a String{{!RFC8941}}.
137
+
138
+
The field value SHOULD remain consistent over a sequence of HTTP responses. It is this characteristic that differentiates it from the [RateLimit](#ratelimit-field) field that contains information that MAY change on every request. The "RateLimit-Policy" field enables clients to control their own flow of requests based on policy information provided by the server. Situations where throttling constraints are highly dynamic are better served using the (RateLimit field)[{#ratelimit-field}] that communicates the latest service information a client can react to. Both fields can be communicated by the server when appropriate.
139
+
140
+
Lists of Quota Policy Items ({{quotapolicy-item}}) can be split over multiple "RateLimit-Policy" fields in the same HTTP response as described in {{Section 3.1 of !STRUCTURED-FIELDS=RFC8941}}.
A quota policy Item contains an identifier for the policy and a set of parameters that contain information about a server's capacity allocation for the policy.
147
+
A quota policy Item contains an identifier for the policy and a set of Parameters{{!RFC8941}} that contain information about a server's capacity allocation for the policy.
138
148
139
149
The following parameters are defined:
140
150
@@ -154,7 +164,7 @@ Other parameters are allowed and can be regarded as comments.
154
164
155
165
Implementation- or service-specific parameters SHOULD be prefixed parameters with a vendor identifier, e.g. `acme-policy`, `acme-burst`.
156
166
157
-
This field cannot appear in a trailer section.
167
+
This field MUST NOT appear in a trailer section.
158
168
159
169
### Quota Parameter {#ratelimitpolicy-quota}
160
170
@@ -175,7 +185,7 @@ The "qu" parameter value conveys the quota units applicable to the quota ({{rate
175
185
176
186
### Window Parameter {#ratelimitpolicy-window}
177
187
178
-
The "w" parameter value conveys a time window applicable to the quota ({{ratelimitpolicy-quota}}). The time window MUST be a non-negative Integer value expressing an interval in seconds, similar to the "delay-seconds" rule defined in {{Section 10.2.3 of HTTP}}. Sub-second precision is not supported.
188
+
The "w" parameter value conveys a time window applicable to the quota ({{ratelimitpolicy-quota}}). The time window MUST be a non-negative, non-zero, Integer value expressing an interval in seconds, similar to the "delay-seconds" rule defined in {{Section 10.2.3 of HTTP}}. Sub-second precision is not supported.
A server uses the "RateLimit" response header field to communicate the service limit for a quota policy for a particular partition key.
222
+
A server uses the "RateLimit" response header field to communicate the current service limit for a quota policy for a particular partition key.
223
+
224
+
The field is expressed as a List{{!RFC8941}} of Service Limit Items ({{servicelimit-item}}).
213
225
214
-
The field is expressed as a List of Service Limit Items ({{servicelimit-item}}).
226
+
Lists of Service Limit Items can be split over multiple "RateLimit" fields in the same HTTP response as described in {{Section 3.1 of !STRUCTURED-FIELDS=RFC8941}}.
215
227
216
228
~~~
217
229
RateLimit: "default";r=50;t=30
218
230
~~~
219
231
220
232
## Service Limit Item {#servicelimit-item}
221
233
222
-
Each service limit Item identifies the quota policy ({{quotapolicy-item}}) associated with the request and contains parameters with information about the current service limit.
234
+
Each service limit Item{{!RFC8941}} identifies the quota policy ({{quotapolicy-item}}) associated with the request and contains Parameters{{!RFC8941}} with information about the current service limit.
223
235
224
236
The following parameters are defined in this specification:
0 commit comments