Skip to content

Latest commit

 

History

History

health

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Health checks

gRPC has a health checking protocol that defines how health checks for services should be carried out. Tonic supports this protocol with the optional tonic health crate.

This example uses the crate to set up a HealthServer that will run alongside the application service. In order to test it, you may use community tools like grpc_health_probe.

For example, running the following bash script:

while [ true ]; do
./grpc_health_probe -addr=[::1]:50051 -service=helloworld.Greeter
sleep 1
done

will show the change in health status of the service over time.