Assuming no load balancing in your configuration, there is only one TCP
session to your server and all the RPC requests (Write, Read,
StreamChannel) use the same session. The session remains connected across
the requests (no disconnection and reconnection).

On Fri, Oct 5, 2018 at 7:31 AM <[email protected]> wrote:

> Hello folks-
> I am trying to understand TCP session management with gRPC.
> I posted this in stackoverflow as well. But, thought would post here as
> well.
>
> Sorry if this question is naive. (gRPC novice here). But, I would like to
> understand this.
>
> Let's say I have a gRPC service definition like this:
>
> service ABC {
>   // Update one or more entities.
>   rpc Write(WriteRequest) returns (WriteResponse) {
>   }
>   // Read one or more entities.
>   rpc Read(ReadRequest) returns (stream ReadResponse)
>   {
>   }
>   // Represents the bidirectional stream
>   rpc StreamChannel(stream StreamMessageRequest)
>       returns (stream StreamMessageResponse) {
>   }
> }
> Our potential use case would be the server built using C++ and the client
> using Java. (Not sure is that matters).
>
> I would like to understand how the TCP sessions are managed. The Stream
> Channel would be used for constant telemetry data streaming between the
> client and the server. (Constant data transfer, but the bulk from the
> server to the client).
>
> Does the StreamChannel have a separate TCP session, while for every Write
> and Read a new session would be established and terminated after the call
> is done?
>
> Or is there a single TCP session over which all the communication happens?
>
> Again, please excuse me if this is very naive.
>
> Thanks for your time.
>
> Your time is much appreciated.
>
> --
> 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/35e917d6-7173-4419-b2e7-ca85d9d882b4%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAFD07aStW9L1tRBj0QZeBEvQQ7esHN6B%2BSwi%3DSXxm0_AOGGYog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to