diff --git a/A6.md b/A6.md index 983ea8360..5689cb62f 100644 --- a/A6.md +++ b/A6.md @@ -194,6 +194,8 @@ There are five possible types of server responses. The list below enumerates the ![State Diagram](A6_graphics/StateDiagram.png) +[Link to SVG file](A6_graphics/StateDiagram.svg) + ### Retry Internals #### Where Retries Occur @@ -202,6 +204,8 @@ The retry policy will be implemented in-between the channel and the load balanci ![Where Retries Occur](A6_graphics/WhereRetriesOccur.png) +[Link to SVG file](A6_graphics/WhereRetriesOccur.svg) + #### When Retries are Valid In certain cases it is not valid to retry an RPC. These cases occur when the RPC has been *committed*, and thus it does not make sense to perform the retry. @@ -239,6 +243,8 @@ RPC failures can occur in three distinct ways: ![Where RPCs Fail](A6_graphics/WhereRPCsFail.png) +[Link to SVG file](A6_graphics/WhereRPCsFail.svg) + The last case is handled by the configurable retry policy that is the main focus of this document. The first two cases are retried automatically by the gRPC client library, **regardless** of the retry configuration set by the service owner. We are able to do this because these request have not made it to the server application logic, and thus are always safe to retry. In the first case, in which the RPC never leaves the client, the client library will immediately retry the call once. If this immediate retry fails, then the failure will be treated just like the third bullet point. This means that it will be handled by the configured retry policy. diff --git a/A6_graphics/StateDiagram.svg b/A6_graphics/StateDiagram.svg new file mode 100644 index 000000000..685cc83a5 --- /dev/null +++ b/A6_graphics/StateDiagram.svg @@ -0,0 +1,2 @@ + +
Client sends RPC
Client sends RPC
Retry the RPC
Retry the RPC
Check Retry Config to Determine if Retry Should be Performed
[Not supported by viewer]
Client Library
Returns Success
to Application
[Not supported by viewer]
Client Library
Returns Failure
to Application
[Not supported by viewer]
not seen
by server
[Not supported by viewer]
not left
client
[Not supported by viewer]
failure
[Not supported by viewer]
retry 
should 
occur
[Not supported by viewer]
retry should
not occur
[Not supported by viewer]
success
success
pushback: 
don't retry
[Not supported by viewer]
pushback
don't retry
[Not supported by viewer]
success
[Not supported by viewer]
failure or
pushback:
retry
[Not supported by viewer]
Retry Logic State Diagram
<font style="font-size: 14px">Retry Logic State Diagram</font>
\ No newline at end of file diff --git a/A6_graphics/WhereRPCsFail.svg b/A6_graphics/WhereRPCsFail.svg new file mode 100644 index 000000000..df92cfafc --- /dev/null +++ b/A6_graphics/WhereRPCsFail.svg @@ -0,0 +1,2 @@ + +

<div style="text-align: right"><br></div>
Client Application
Client Application

<div style="text-align: right"><br></div>
Server Application
Server Application
gRPC Server Library
[Not supported by viewer]
The Wire
The Wire
gRPC Client
Library
[Not supported by viewer]
1
[Not supported by viewer]
2
[Not supported by viewer]
3
[Not supported by viewer]
\ No newline at end of file diff --git a/A6_graphics/WhereRetriesOccur.svg b/A6_graphics/WhereRetriesOccur.svg new file mode 100644 index 000000000..2c216e2a3 --- /dev/null +++ b/A6_graphics/WhereRetriesOccur.svg @@ -0,0 +1,2 @@ + +
Retry Policy
<b>Retry Policy</b>
LB Policy
<b>LB Policy</b>
Connected Subchannel
Connected Subchannel
Connected Subchannel
Connected Subchannel
Connected Subchannel
Connected Subchannel
Connected Subchannel
Connected Subchannel
Connected Subchannel
Connected Subchannel
Channel
<b>Channel</b>
\ No newline at end of file