grpc / grpc/grpc-rust

`tonic-health` required services

Open
#1,930 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
12.5k
Forks
1.3k
Avg merge
4d 7h
Merged PRs (30d)
24

Description

## Feature Request

### Crates

`tonic-health`

### Motivation

Right now it reports the health status per named service + a "default" service, which starts as `Serving` but can be updated later.

Kubernetes, for example, can subscribe only to one of them, and usually the "default" one is sufficient.
I.e., the default service is the thing that actually matters. That leads to different decisions how exactly to maintain it, especially in the case when you have multiple _required_ services. I.e, when a failure of any of them means that the whole app is unhealthy. Ex. "_App should be considered healthy when both Postgres and Kafka are connected_".

### Proposal

Add an optional list of required services (i.e., a `Vec` internally) and check against it every other change to update the default status.

I may create a PR with an implementation of this feature, if the idea looks good. Please let me know.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.