Skip to content

Commit dc18fbc

Browse files
committed
fix: Editorial issues
1 parent 31e5fae commit dc18fbc

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

draft-ietf-httpapi-ratelimit-headers.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ normative:
4545
IANA: RFC8126
4646
HTTP: RFC9110
4747
PROBLEM: RFC9457
48+
SF: RFC8941
49+
WEB-ORIGIN: RFC6454
4850

4951
informative:
5052
PRIVACY: RFC6973
@@ -90,21 +92,21 @@ The following features are out of the scope of this document:
9092
: RateLimit header fields are not meant to support authorization or other kinds of access controls.
9193

9294
Response status code:
93-
: RateLimit header fields may be returned in both successful (see {{Section 15.3 of HTTP}}) and non-successful responses. This specification does not cover whether non Successful responses count on quota usage, nor does it mandates any correlation between the RateLimit values and the returned status code.
95+
: RateLimit header fields may be returned in both successful (see {{Section 15.3 of HTTP}}) and non-successful responses. This specification does not cover whether non Successful responses count on quota usage, nor does it mandate any correlation between the RateLimit values and the returned status code.
9496

9597
Throttling algorithm:
9698
: This specification does not mandate a specific throttling algorithm. The values published in the fields, including the window size, can be statically or dynamically evaluated.
9799

98100
Service Level Agreement:
99-
: Conveyed quota hints do not imply any service guarantee. Server is free to throttle respectful clients under certain circumstances.
101+
: Conveyed quota hints do not imply any service guarantee. Server is free to throttle clients that adhere to the server’s recommended limits under certain circumstances.
100102

101103
## Notational Conventions
102104

103105
{::boilerplate bcp14}
104106

105-
The term Origin is to be interpreted as described in Section 7 of{{!WEB-ORIGIN=RFC6454}}.
107+
The term Origin is to be interpreted as described in {{Section 7 of WEB-ORIGIN}}.
106108

107-
This document uses the terms List, Item and Integer from {{Section 3 of !STRUCTURED-FIELDS=RFC8941}} to specify syntax and parsing, along with the concept of "bare item".
109+
This document uses the terms List, Item and Integer from {{Section 3 of SF}} to specify syntax and parsing, along with the concept of "bare item".
108110

109111
The term "problem type" in this document is to be interpreted as described in [PROBLEM].
110112

@@ -129,25 +131,25 @@ The term "problem type" in this document is to be interpreted as described in [P
129131
: A service limit is the currently remaining quota from a specific quota policy and, if defined, the remaining time before quota is reallocated.
130132

131133
List:
132-
: A {{!STRUCTURED-FIELDS=RFC8941}} list of Items
134+
: A {{SF}} list of Items
133135

134136
Item:
135-
: A {{!STRUCTURED-FIELDS=RFC8941}} item with a set of associated parameters
137+
: A {{SF}} item with a set of associated parameters
136138

137139
# RateLimit-Policy Field {#ratelimit-policy-field}
138140

139-
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}}.
141+
The "RateLimit-Policy" response header field is a non-empty List{{SF}} of Quota Policy Items ({{quotapolicy-item}}). The Item{{SF}} value MUST be a String{{SF}}.
140142

141143
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.
142144

143-
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}}.
145+
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 SF}}.
144146

145147
~~~
146148
RateLimit-Policy: "burst";q=100;w=60,"daily";q=1000;w=86400
147149
~~~
148150

149151
## Quota Policy Item {#quotapolicy-item}
150-
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.
152+
A quota policy Item contains an identifier for the policy and a set of Parameters{{SF}} that contain information about a server's capacity allocation for the policy.
151153

152154
The following parameters are defined:
153155

@@ -224,17 +226,17 @@ The following example shows a policy with a partition key and a quota unit:
224226

225227
A server uses the "RateLimit" response header field to communicate the current service limit for a quota policy for a particular partition key.
226228

227-
The field is expressed as a List{{!RFC8941}} of Service Limit Items ({{servicelimit-item}}).
229+
The field is expressed as a List{{SF}} of Service Limit Items ({{servicelimit-item}}).
228230

229-
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}}.
231+
Lists of Service Limit Items can be split over multiple "RateLimit" fields in the same HTTP response as described in {{Section 3.1 of SF}}.
230232

231233
~~~
232234
RateLimit: "default";r=50;t=30
233235
~~~
234236

235237
## Service Limit Item {#servicelimit-item}
236238

237-
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.
239+
Each service limit Item{{SF}} identifies the quota policy ({{quotapolicy-item}}) associated with the request and contains Parameters{{SF}} with information about the current service limit.
238240

239241
The following parameters are defined in this specification:
240242

@@ -247,7 +249,7 @@ The following parameters are defined in this specification:
247249
pk:
248250
: The OPTIONAL "pk" parameter value conveys the partition key associated to the corresponding request.
249251

250-
This field cannot appear in a trailer section. Other parameters are allowed and can be regarded as comments.
252+
This field MUST NOT appear in a trailer section. Other parameters are allowed and can be regarded as comments.
251253

252254
Implementation- or service-specific parameters SHOULD be prefixed parameters with a vendor identifier, e.g. `acme-policy`, `acme-burst`.
253255

@@ -309,29 +311,29 @@ Content-Type: application/problem+json
309311

310312
{
311313
"type": "https://iana.org/assignments/http-problem-types#quota-exceeded",
312-
"title": "Request cannot be satisifed as assigned quota has been exceeded",
314+
"title": "Request cannot be satisfied as assigned quota has been exceeded",
313315
"violated-policies": ["daily","bandwidth"]
314316
}
315317
~~~
316318

317319
## Temporary Reduced Capacity
318320

319-
This section defines the "https://iana.org/assignments/http-problem-types#temporary-reduced-capacity" problem type. A server MAY use this problem type if it wants to communicate to the client that the requests sent by the client exceed cannot currently be satisfied due to a temporary reduction in capacity due to service limitations. The server MAY chose to include a RateLimit-Policy field indicating the new temporarily lower quota. This problem type defines the extension member "violated-policies" as an array of strings, whose value is the names of policies where the quota was exceeded.
321+
This section defines the "https://iana.org/assignments/http-problem-types#temporary-reduced-capacity" problem type. A server MAY use this problem type if it wants to communicate that the client’s requests currently cannot be satisfied due to a temporary reduction in server capacity. The server MAY choose to include a RateLimit-Policy field indicating the new temporarily lower quota. This problem type defines the extension member "violated-policies" as an array of strings, whose value is the names of policies where the quota was exceeded.
320322

321323
~~~ http-message
322324
HTTP/1.1 503 Server Unavailable
323325
Content-Type: application/problem+json
324326

325327
{
326328
"type": "https://iana.org/assignments/http-problem-types#temporary-reduced-capacity",
327-
"title": "Request cannot be satisifed due to temporary server capacity constraints",
329+
"title": "Request cannot be satisfied due to temporary server capacity constraints",
328330
"violated-policies": ["hourly"]
329331
}
330332
~~~
331333

332334
## Abnormal Usage Detected
333335

334-
This section defines the "https://iana.org/assignments/http-problem-types#abnormal-usage-detected" problem type. A server MAY use this problem type to communicate to the client that it has detected a pattern of requests that suggest unintentional or malicous behaviour on the part of the client. This problem type defines the extension member "violated-policies" as an array of strings, whose value is the names of policies where the quota was exceeded.
336+
This section defines the "https://iana.org/assignments/http-problem-types#abnormal-usage-detected" problem type. A server MAY use this problem type to communicate to the client that it has detected a pattern of requests that suggest unintentional or malicious behaviour on the part of the client. This problem type defines the extension member "violated-policies" as an array of strings, whose value is the names of policies where the quota was exceeded.
335337

336338
~~~ http-message
337339
HTTP/1.1 429 Too Many Requests
@@ -376,7 +378,7 @@ Implementers concerned with response fields' size, might take into account their
376378

377379
# Client Behavior {#receiving-fields}
378380

379-
The RateLimit header fields can be used by clients to determine whether the associated request respected the server's quota policy, and as an indication of whether subsequent requests will. However, the server might apply other criteria when servicing future requests, and so the quota policy may not completely reflect whether requests will succeed.
381+
The RateLimit header fields can be used by clients to determine whether the associated request respected the server's quota policy, and as an indication of whether subsequent requests will be successful. However, the server might apply other criteria when servicing future requests, and so the quota policy may not completely reflect whether requests will succeed.
380382

381383
For example, a successful response with the following fields:
382384

@@ -430,7 +432,7 @@ An intermediary MAY alter the RateLimit header fields in such a way as to commun
430432

431433
An intermediary SHOULD forward a request even when presuming that it might not be serviced; the service returning the RateLimit header fields is the sole responsible of enforcing the communicated quota policy, and it is always free to service incoming requests.
432434

433-
This specification does not mandate any behavior on intermediaries respect to retries, nor requires that intermediaries have any role in respecting quota policies. For example, it is legitimate for a proxy to retransmit a request without notifying the client, and thus consuming quota units.
435+
This specification does not mandate any behavior on intermediaries with respect to retries, nor does it require that intermediaries have any role in respecting quota policies. For example, it is legitimate for a proxy to retransmit a request without notifying the client, and thus consuming quota units.
434436

435437
[Privacy considerations](#privacy) provide further guidance on intermediaries.
436438

@@ -636,7 +638,7 @@ A basic quota mechanism limits the number of acceptable requests in a given time
636638

637639
When quota is exceeded, servers usually do not serve the request replying instead with a 4xx HTTP status code (e.g. 429 or 403) or adopt more aggressive policies like dropping connections.
638640

639-
Quotas may be enforced on different basis (e.g. per user, per IP, per geographic area, etc.) and at different levels. For example, an user may be allowed to issue:
641+
Quotas may be enforced on different basis (e.g. per user, per IP, per geographic area, etc.) and at different levels. For example, a user may be allowed to issue:
640642

641643
- 10 requests per second;
642644
- limited to 60 requests per minute;
@@ -847,7 +849,7 @@ RateLimit: "default";r=0;t=5
847849
"type": "https://iana.org/assignments/http-problem-types#quota-exceeded"
848850
"title": "Too Many Requests",
849851
"status": 429,
850-
"policy-violations": ["default"]
852+
"violated-policies": ["default"]
851853
}
852854
~~~
853855

@@ -1123,7 +1125,7 @@ RateLimit: "day";r=100;t=36000
11231125

11241126
A problematic way to limit concurrency is connection dropping,
11251127
especially when connections are multiplexed (e.g. HTTP/2)
1126-
because this results in unserviced client requests,
1128+
because this results in client requests not being handled,
11271129
which is something we want to avoid.
11281130

11291131
A semantic way to limit concurrency is to return 503 + Retry-After
@@ -1158,11 +1160,11 @@ RateLimit: "sliding";r=50;t=44
11581160

11591161
9. Can intermediaries alter RateLimit header fields?
11601162

1161-
Generally, they should not because it might result in unserviced requests.
1163+
Generally, they should not because it might result in requests not being handled.
11621164
There are reasonable use cases for intermediaries mangling RateLimit header fields though,
11631165
e.g. when they enforce stricter quota-policies,
11641166
or when they are an active component of the service.
1165-
In those case we will consider them as part of the originating infrastructure.
1167+
In those cases we will consider them as part of the originating infrastructure.
11661168

11671169
10. Why the `w` parameter is just informative?
11681170
Could it be used by a client to determine the request rate?

0 commit comments

Comments
 (0)