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: azure/ConsiderationsForServiceDesign.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -499,13 +499,13 @@ When designing an API, you will almost certainly have to manage how your resourc
499
499
Similarly, it could be very expensive to send a resource to a client. This could be because of its size, network conditions, or a myriad of other reasons.
500
500
Both of these scenarios can be accomplished with conditional requests, where the client specifies a _precondition_
501
501
for execution of a request, based on its last modification date or entity tag ("ETag").
502
-
An Etag identifies a 'version' or 'instance' of a resource and is computed by the service and returned in an `ETag` response header for GET or other operations on the resource.
502
+
An ETag identifies a 'version' or 'instance' of a resource and is computed by the service and returned in an `ETag` response header for GET or other operations on the resource.
503
503
504
504
### Cache Control
505
505
506
506
One of the more common uses for conditional requests is cache control. This is especially useful when resources are large in size, expensive to compute/calculate, or hard to reach (significant network latency).
507
507
A client can make a "conditional GET request" for the resource, with a precondition header that requests that
508
-
data be returned only when the version on the service does not match the Etag or last modified date in the header.
508
+
data be returned only when the version on the service does not match the ETag or last modified date in the header.
509
509
If there are no changes, then there is no need to return the resource, as the client already has the most recent version.
510
510
511
511
Implementing this strategy is relatively straightforward. First, you will return an `ETag` with a value that uniquely identifies the instance (or version) of the resource. The [Computing ETags](./Guidelines.md#computing-etags) section provides guidance on how to properly calculate the value of your `ETag`.
@@ -517,7 +517,7 @@ This tells the service to compare the `ETag` that came in with the request, with
517
517
Optimistic concurrency is a strategy used in HTTP to avoid the "lost update" problem that can occur when multiple clients attempt to update a resource simultaneously.
518
518
Clients can use ETags returned by the service to specify a _precondition_ for the execution of an update, to ensure that the resource has not been updated since the client last observed it.
519
519
For example, the client can specify an `If-Match` header with the last ETag value received by the client in an update request.
520
-
The service processes the update only if the Etag value in the header matches the ETag of the current resource on the server.
520
+
The service processes the update only if the ETag value in the header matches the ETag of the current resource on the server.
521
521
By computing and returning ETags for your resources, you enable clients to avoid using a strategy where the "last write always wins."
522
522
523
523
## Getting Help: The Azure REST API Stewardship Board
0 commit comments