#service-state #web-server #service-health #service-server #probe

service-probe

Probe for querying service state through a minimal HTTP service

7 unstable releases (3 breaking)

Uses new Rust 2024

0.4.0 Jan 21, 2026
0.3.0 Nov 7, 2025
0.2.1 Jan 31, 2025
0.2.0 Dec 11, 2024
0.1.2 Nov 28, 2024

#300 in HTTP server

Download history 3163/week @ 2025-11-01 1589/week @ 2025-11-08 1896/week @ 2025-11-15 1193/week @ 2025-11-22 2285/week @ 2025-11-29 2241/week @ 2025-12-06 2010/week @ 2025-12-13 2409/week @ 2025-12-20 538/week @ 2025-12-27 2547/week @ 2026-01-03 3143/week @ 2026-01-10 2363/week @ 2026-01-17 3605/week @ 2026-01-24 3573/week @ 2026-01-31 4554/week @ 2026-02-07 3584/week @ 2026-02-14

16,169 downloads per month

MIT/Apache

13KB
181 lines

Service probe

This crate provides an easy way to start a HTTP server that can be used for making the status of a service transparent to observers. The main use case is to communicate information about the health status of a service in containerized environments.

Tasks and synchronization throughout this crate uses tokio functionality, so the runtime must be present and running when the functions of this crate are called.

To start the service probe, add the following code to your service:

use service_probe::{start_probe, ServiceState, set_service_state};

// The probe server is started in the background. Up signals that the services is starting.
start_probe([0u8, 0, 0, 0], 11333, ServiceState::Up).await.unwrap();

// If everything is ready, we set the state to ready.
set_service_state(ServiceState::Ready);


Service Probe

This crate provides an easy way to make the status of a service transparent to observers by starting a HTTP server. The main use case is to communicate information about the health status of a service in containerized environments.

The "main" service does not need to provide a HTTP server on its own, the probe will spin up its own minimalistic HTTP server.

The following endpoints are provided (they can be used with or without trailing slash):

Endpoints Response body HTTP Status Code
/, /health UP or READY 200
/ready READY if ready 200 else 503

Dependencies

~4–15MB
~130K SLoC