Skip to content

Commit 63ad871

Browse files
authored
docs/guides/deadlines: Replace "request" with "RPC" (grpc#1336)
Not all usages of request were changed, but any that were talking about the deadline of a request were changed, because requests don't have deadlines. Only RPCs have deadlines. I also made it more clear at which point a timeout would start from within gRPC.
1 parent a732b16 commit 63ad871

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Diff for: content/en/docs/guides/deadlines.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ improve the resource utilization and latency of your system.
1515

1616
Note that while some language APIs have the concept of a __deadline__, others
1717
use the idea of a __timeout__. When an API asks for a deadline, you provide a
18-
point in time which the request should not go past. A timeout is the max
19-
duration of time that the request can take. For simplicity, we will only refer
20-
to deadline in this document.
18+
point in time which the call should not go past. A timeout is the max duration
19+
of time that the call can take. A timeout can be converted to a deadline by
20+
adding the timeout to the current time when the application starts a call. For
21+
simplicity, we will only refer to deadline in this document.
2122

2223
### Deadlines on the Client
2324

@@ -33,24 +34,24 @@ will give up and fail the RPC with the `DEADLINE_EXCEEDED` status.
3334

3435
### Deadlines on the Server
3536

36-
A server might receive requests from a client with an unrealistically short
37+
A server might receive RPCs from a client with an unrealistically short
3738
deadline that would not give the server enough time to ever respond in time.
3839
This would result in the server just wasting valuable resources and in the worst
3940
case scenario, crash the server. A gRPC server deals with this situation by
4041
automatically cancelling a call (`CANCELLED` status) once a deadline set by the
4142
client has passed.
4243

4344
Please note that the server application is responsible for stopping any activity
44-
it has spawned to service the request. If your application is running a
45-
long-running process you should periodically check if the request that initiated
45+
it has spawned to service the RPC. If your application is running a
46+
long-running process you should periodically check if the RPC that initiated
4647
it has been cancelled and if so, stop the processing.
4748

4849
#### Deadline Propagation
4950

5051
Your server might need to call another server to produce a response. In these
5152
cases where your server also acts as a client you would want to honor the
5253
deadline set by the original client. Automatically propagating the deadline from
53-
an incoming request to an outgoing one is supported by some gRPC
54+
an incoming RPC to an outgoing one is supported by some gRPC
5455
implementations. In some languages this behavior needs to be explicitly
5556
enabled (e.g. C++) and in others it is enabled by default (e.g. Java and Go).
5657
Using this capability lets you avoid the error-prone approach of manually
@@ -108,4 +109,4 @@ sequenceDiagram
108109

109110
- [Deadlines blogpost]
110111

111-
[Deadlines blogpost]: https://grpc.io/blog/deadlines/
112+
[Deadlines blogpost]: https://grpc.io/blog/deadlines/

0 commit comments

Comments
 (0)