Are Spice clients / channels designed to be long-lived? #1900
-
What is the designed life-time of a client? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is all basically details of how to handle gRPC connections: https://grpc.io/docs/what-is-grpc/core-concepts/#channels
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 to create one client to handle all the SpiceDB communication for your application, once you hit the limits of a single channel. You can see more in the gRPC best practices No need for pooling because the underlying channel does H2, which in itself does multiplexing. You may eventually hit some limits in the channel. The best practices page says:
|
Beta Was this translation helpful? Give feedback.
This is all basically details of how to handle gRPC connections: https://grpc.io/docs/what-is-grpc/core-concepts/#channels
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 …