Supporting Retry Policy and Timeout configuration for each Operation #102
Replies: 3 comments 1 reply
-
What's the benefit of having this static information in the machine-readable description over sending a |
Beta Was this translation helpful? Give feedback.
-
I could see this information being useful for webhooks or callbacks -- that is, requests initiated by the API provider, that will retry again after a pre-indicated time if the initial request is rejected or the server is unresponsive. This is totally orthogonal to the "Retry-After" header, which is used in API responses that use the 30x, 429, or 503 response codes. |
Beta Was this translation helpful? Give feedback.
-
Is the timeout for connect, read or total timeout? I think those values depend on data and network setup (larger data needs larger timeouts, but different networks have different maxima), don't they? |
Beta Was this translation helpful? Give feedback.
-
Having retry config & timeout in the spec, clients will retry errors for a given an operation based on the provided retry configs and shouldn't retry errors which are not retriable.
In a way, retry config is part of API contract.
Sample spec:
which says if Operation
CreateBook
fails with error 500 or 503 then the operation should be retried based on the given configuration.Inspiration: https://github.com/search?q=repo%3Agoogleapis%2Fgoogleapis+path%3Aservice_config.json+retryPolicy&type=code
Any thoughts / suggestions?
Beta Was this translation helpful? Give feedback.
All reactions