Use Grpc Request Timeout
- Dominant language
- Rust
- Stars
- 12.5k
- Forks
- 1.3k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 24
Description
## Feature Request
### Motivation
I've been doing some timeout testing with tonic and found that when both the channel timeout (https://docs.rs/tonic/0.8.0/tonic/transport/channel/struct.Endpoint.html#method.timeout) and request timeout are set, the smaller value wins: https://github.com/hyperium/tonic/blob/0b03b30cccc67d517b05587614405d63d942b1bb/tonic/src/transport/service/grpc_timeout.rs#L49
In my usecase I'd like the per-request timeout to take precedence over the preconfigured one.
### Proposal
Would it be acceptable to be able to configure which timeouts takes precedence via a configuration option?
### Alternatives
1. Change the current behaviour:
Is the current behaviour of "smaller values wins" right? AFAIK the grpc-timeout value in the request is used to tell the server what the client deadline/timeout is. But if we then timeout "ahead of time" we're kinda then lying to the server by telling it our deadline is x when in fact is y, y
Contributor guide
Assessment
This issue has not been assessed yet.