| 1 |
gRPC Wait for Ready Semantics |
| 2 |
============================= |
| 3 |
|
| 4 |
If an RPC is issued but the channel is in `TRANSIENT_FAILURE` or `SHUTDOWN` |
| 5 |
states, the RPC is unable to be transmitted promptly. By default, gRPC |
| 6 |
implementations SHOULD fail such RPCs immediately. This is known as "fail fast," |
| 7 |
but usage of the term is historical. RPCs SHOULD NOT fail as a result of the |
| 8 |
channel being in other states (`CONNECTING`, `READY`, or `IDLE`). |
| 9 |
|
| 10 |
gRPC implementations MAY provide a per-RPC option to not fail RPCs as a result |
| 11 |
of the channel being in `TRANSIENT_FAILURE` state. Instead, the implementation |
| 12 |
queues the RPCs until the channel is `READY`. This is known as "wait for ready." |
| 13 |
The RPCs SHOULD still fail before `READY` if there are unrelated reasons, such |
| 14 |
as the channel is `SHUTDOWN` or the RPC's deadline is reached. |