Skip to content

Are Spice clients / channels designed to be long-lived? #1900

Closed Answered by vroldanbet
theronic asked this question in Q&A
Discussion options

You must be logged in to vote

This is all basically details of how to handle gRPC connections: https://grpc.io/docs/what-is-grpc/core-concepts/#channels

A gRPC channel provides a connection to a gRPC server on a specified host and port. It is used when creating a client stub. Clients can specify channel arguments to modify gRPC’s default behavior, such as switching message compression on or off. A channel has state, including connected and idle.
How gRPC deals with closing a channel is language-dependent. Some languages also permit querying channel state.

A channel is created when you create a client, which should be long-lived. It may be language-dependent but those are typically thread-safe. The recommendation is …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jzelinskie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants