On Mon, Apr 16, 2018 at 5:31 AM, Robert Bielik <[email protected]> wrote:
> I have a streaming RPC that reports back a progress message to a client. > Right now a deadline of 10 seconds is set, however, the time it takes for > the RPC to complete might very well exceed 10 seconds. > > Questions: > 1. Is there a way to reset the client context deadline timer when I > receive a streaming message from the server ? > No. There timeout is for the entire call. It isn't from the last point of "progress" or similar. 2. Should I have a deadline at all in a streaming RPC ? > For many streaming RPCs, yes. For long-lived RPCs or highly-variable RPCs, maybe not. But in that case you may want to make your own timeout mechanism and cancel the RPC if it seems things aren't going well. In certain circumstances, like long-lived streaming RPCs, you may want to lean on keepalive to help detect connection breakages instead of deadlines (since the deadline would be far too large anyway). Although keepalive is point-to-point and not end-to-end; you would need to make sure any proxies and similar also have some sort of failure detection. -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CA%2B4M1oNMfQeHxs%2BJuJZ3OGSM6W-WrKk2e_GPcQZDUwz0N_AFzA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
smime.p7s
Description: S/MIME Cryptographic Signature
