Skip to main content

Health checks overview

A health check is an automated monitoring mechanism that periodically tests your backend services to ensure they are accessible and responsive through your shares.

It works by sending HTTP requests to a specified endpoint and validating the response against your expected criteria. This allows you to proactively monitor the availability and performance of your services and receive immediate feedback on their operational status.

How health checks work

The health check process follows these steps:

  1. Configuration: You define a health check specifying the target share, endpoint, HTTP method, expected response, and timeout
  2. Execution: NetFoundry's infrastructure executes the health check by making an HTTP request through to your Frontdoor agent that serves your share
  3. Response Validation: The system validates the response against your specified criteria (HTTP status code, response time)
  4. Result Reporting: The health check returns detailed results including success/failure status

Health check configuration

Health checks are configured with these parameters:

  • Share Token The identifier of the share you want to monitor. Health checks can only test services that are already exposed through a Share.
  • Endpoint The specific path or URL endpoint to test (e.g., /health, /status, /api/ping). The health check endpoint should not be exposed to the public internet.
  • HTTP Method The HTTP verb to use for the request, with GET being most common for health endpoints, POST for endpoints requiring POST requests, and HEAD for lightweight checks. All HTTP methods are supported, including other standard HTTP methods as needed for your specific use case.
  • Expected HTTP Response The HTTP status code you expect from a healthy service, with 200 being the default standard success response. Common values include 202 for accepted asynchronous operations and 204 for success with no content, allowing you to customize the expected response based on your service's behavior.
  • Timeout Maximum time to wait for a response in milliseconds (default: 1000ms). Adjust based on your service's typical response times.

Integration with shares

Health checks are tightly integrated with your shares.

Share dependency

Health checks operate exclusively with services that are already exposed through existing shares, creating a fundamental dependency relationship between these two components. The target share must remain active and properly configured throughout the Health Check's lifecycle, as the monitoring functionality relies entirely on the share's ability to route requests to your backend services.

Environment context

Health checks execute within the context of your Frontdoor environment, leveraging the same infrastructure and network pathways that serve your production traffic. This execution model ensures that health checks test services under realistic conditions, validating that external users can successfully access your services through the established share configuration and network routing.

Share lifecycle

The lifecycle management of health checks is closely tied to their associated shares, with automatic cleanup occurring when a share is deleted to prevent orphaned monitoring configurations. Health check results provide valuable insights for validating share configuration and performance characteristics, making them an essential tool for verifying share functionality after configuration changes or updates to your backend services.

More info