-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update grpc-js to 1.10.x #1388
Update grpc-js to 1.10.x #1388
Conversation
Do we have any control of the retry timeout that this library is using, it may be less surprising if we could set it to be the same as our retry, or alternatively, I saw that it would retry 5 times (not configurable) it may make sense if 5*their_timeout < our_timeout ... |
No. AFAICS, there's no knob we can tune for transparent retries. It is possible to completely disable that feature, but we really do want it, as that is required to avoid issues in Cloud when the proxy layer sends HTTP2 GOAWAY (we have had a few reports of that lately). Another option would be to set a default deadline, but that would have other undesirable impacts (e.g. deadline would also affect the server's processing of requests). In fact, there's no backoff/throttling involved in transparent proxies, and no timeout either. In this regard, see the following statements from the gRPC Retry Policy design document (you may want to read this section first for context):
One last thing. The official implementations of gRPC for Java and Go both have had support for transparent retries since 2017; the Node implementation is just catching up with those. And yet, I can't find any trace of issues that would relate to transparent retries in our Java and Go SDKs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice test!
Ignoring CI fail on job "Continuous Integration / build-docs", as deployment to Vercel is known to be broken ATM. |
What was changed
@grpc/grpc-js
, and update it to 1.10.6.Why?
grpc-js had been pinned to 1.7.3 in #1073, as 1.8.x introduced multiple bugs, as well a built-in retry feature, which could possibly conflict with our own retry interceptor.
Recently, there's been security concerns regarding older releases of grpc-js, as well as report of a bug that has been presumably been resolved in recent grpc-js releases.
After more testing, it has been demonstrated that the built-in retry mechanism introduced in grpc-js 1.8 does not conflict with ours. Their retry mechanism is enabled by default, but will only perform so called "transparent retries" unless configured otherwise.
Transparent retries are cases where the gRPC library is able to determine that a request has not been received by the remote end (e.g. if the underlying HTTP/2 channel is being closed following a GOAWAY notification). Those cases are inherently safe to retry, but identifying those require connection level knowledge that is not exposed to our retry interceptor. Consequently, our own retry logic would simply fail to retry in those specific cases.
Resolves #1026.