Skip to content

Commit cd34652

Browse files
authored
Merge pull request #155 from ietf-wg-httpapi/editorial-updates
fix: Editorial issues
2 parents 218141d + 424b80a commit cd34652

File tree

1 file changed

+28
-25
lines changed

1 file changed

+28
-25
lines changed

draft-ietf-httpapi-ratelimit-headers.md

Lines changed: 28 additions & 25 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=RFC9651}} 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,26 @@ 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=RFC9651}} list of Items
134+
: A {{SF}} list of Items
133135

134136
Item:
135-
: A {{!STRUCTURED-FIELDS=RFC9651}} 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{{!RFC9651}} of Quota Policy Items ({{quotapolicy-item}}). The Item{{!RFC9651}} value MUST be a String{{!RFC9651}}.
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

141-
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.
143+
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=RFC9651}}.
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{{!RFC9651}} that contain information about a server's capacity allocation for the policy.
152+
153+
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.
151154

152155
The following parameters are defined:
153156

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

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

227-
The field is expressed as a List{{!RFC9651}} of Service Limit Items ({{servicelimit-item}}).
230+
The field is expressed as a List{{SF}} of Service Limit Items ({{servicelimit-item}}).
228231

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=RFC9651}}.
232+
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}}.
230233

231234
~~~
232235
RateLimit: "default";r=50;t=30
233236
~~~
234237

235238
## Service Limit Item {#servicelimit-item}
236239

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

239242
The following parameters are defined in this specification:
240243

@@ -247,7 +250,7 @@ The following parameters are defined in this specification:
247250
pk:
248251
: The OPTIONAL "pk" parameter value conveys the partition key associated to the corresponding request.
249252

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

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

@@ -309,29 +312,29 @@ Content-Type: application/problem+json
309312

310313
{
311314
"type": "https://iana.org/assignments/http-problem-types#quota-exceeded",
312-
"title": "Request cannot be satisifed as assigned quota has been exceeded",
315+
"title": "Request cannot be satisfied as assigned quota has been exceeded",
313316
"violated-policies": ["daily","bandwidth"]
314317
}
315318
~~~
316319

317320
## Temporary Reduced Capacity
318321

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.
322+
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.
320323

321324
~~~ http-message
322325
HTTP/1.1 503 Server Unavailable
323326
Content-Type: application/problem+json
324327

325328
{
326329
"type": "https://iana.org/assignments/http-problem-types#temporary-reduced-capacity",
327-
"title": "Request cannot be satisifed due to temporary server capacity constraints",
330+
"title": "Request cannot be satisfied due to temporary server capacity constraints",
328331
"violated-policies": ["hourly"]
329332
}
330333
~~~
331334

332335
## Abnormal Usage Detected
333336

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.
337+
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.
335338

336339
~~~ http-message
337340
HTTP/1.1 429 Too Many Requests
@@ -376,7 +379,7 @@ Implementers concerned with response fields' size, might take into account their
376379

377380
# Client Behavior {#receiving-fields}
378381

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.
382+
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.
380383

381384
For example, a successful response with the following fields:
382385

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

431434
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.
432435

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.
436+
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.
434437

435438
[Privacy considerations](#privacy) provide further guidance on intermediaries.
436439

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

637640
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.
638641

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:
642+
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:
640643

641644
- 10 requests per second;
642645
- limited to 60 requests per minute;
@@ -847,7 +850,7 @@ RateLimit: "default";r=0;t=5
847850
"type": "https://iana.org/assignments/http-problem-types#quota-exceeded"
848851
"title": "Too Many Requests",
849852
"status": 429,
850-
"policy-violations": ["default"]
853+
"violated-policies": ["default"]
851854
}
852855
~~~
853856

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

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

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

11591162
9. Can intermediaries alter RateLimit header fields?
11601163

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

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

0 commit comments

Comments
 (0)