Reusing Channel for HealthChecks
See original GitHub issueWe are working on a microservice backend that mainly uses gRPC for communication. For health-checking we rely on the gRPC HealthCheck protocol and thus many of our services implement two gRPC services: one for the business functions and one for the health-checks.
Health-checking - in our setting - implies that also all consumed services are checked, too. I.e. service A consumes service B. So A’s health-check requires to invoke service B’s Check
method.
Before switching to AspNetCore and grpc-dotnet we reused the ‘Channel’ or ‘CallInvoker’ instance, respectively for the two clients of Service B and the HealthClient. In AspNetCore we, so far, failed to resemble this reuse behavior. Is there any way to re-use the channel used for one client within another client?
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
No. Each client type has its own channel. Don’t use the gRPC client factory if you need exact control.
A GrpcChannel can be reused with different client types.