Health states and metrics
This reference lists the health statuses, capacity states, and capacity metrics that Boundary workers report to controllers.
To learn how Boundary uses these signals, refer to Monitor worker health. To set the thresholds and view the values, refer to Configure and monitor worker health.
Health status
Boundary calculates the health_status of a worker from the time of its last status report, its io_capacity_state, and its local_storage_state.
| Health status | Conditions |
|---|---|
healthy | Both the io_capacity_state and the local_storage_state are healthy, and the worker reported a status update within the last 15 seconds. |
unhealthy | The worker has not reported a status update within the last 15 seconds, or the io_capacity_state or the local_storage_state is unhealthy. |
unknown | Neither state is unhealthy, and at least one state is unknown. |
The following table shows which health status each state maps to:
| Signal | healthy states | unhealthy states | unknown states |
|---|---|---|---|
io_capacity_state | available, low, not applicable | critically low, exhausted | unknown |
local_storage_state | available, low storage, not configured | critically low storage, out of storage | unknown |
The least healthy signal determines the overall status, in the order unhealthy > unknown > healthy.
I/O capacity states
Boundary derives the io_capacity_state by comparing available_io_capacity to the io_minimum_available_capacity threshold.
| Condition | io_capacity_state | Health status | Controller routing action |
|---|---|---|---|
available_io_capacity is greater than or equal to io_minimum_available_capacity | available | healthy | Eligible for session routing |
available_io_capacity is less than io_minimum_available_capacity and greater than or equal to half of it | low | healthy | Eligible for session routing |
available_io_capacity is less than half of io_minimum_available_capacity | critically low | unhealthy | Excluded from session routing |
available_io_capacity is 0 | exhausted | unhealthy | Excluded from session routing |
| Error reading descriptors, open descriptors exceed the process limit, or status not yet reported | unknown | unknown | Eligible for session routing |
| The host operating system does not use file descriptors (Windows) | not applicable | healthy | Eligible for session routing |
The worker checks its I/O capacity every 5 seconds.
Boundary tracks file descriptors on Linux, macOS, FreeBSD, NetBSD, OpenBSD, and Solaris.
Workers on Windows always report not applicable.
Workers earlier than Boundary 1.2.0 do not report an io_capacity_state, and controllers do not filter them on I/O capacity.
When the io_capacity_state is critically low or exhausted, the worker also pauses session recording.
Refer to Effect on session recording.
Local storage states
Boundary derives the local_storage_state by comparing the available disk space in the recording_storage_path directory to the recording_storage_minimum_available_capacity threshold.
| Condition | local_storage_state | Health status |
|---|---|---|
Available disk space is greater than or equal to recording_storage_minimum_available_capacity | available | healthy |
Available disk space is less than recording_storage_minimum_available_capacity and greater than or equal to half of it | low storage | healthy |
Available disk space is less than half of recording_storage_minimum_available_capacity | critically low storage | unhealthy |
| Available disk space is less than 1 MB | out of storage | unhealthy |
The worker has no recording_storage_path configured | not configured | healthy |
| The worker has not yet determined the state, or cannot read the available disk space | unknown | unknown |
The worker checks its disk space every 5 seconds.
A worker in low storage, critically low storage, or out of storage does not return to available as soon as the available disk space crosses back over the threshold.
Available disk space must reach 125 percent of recording_storage_minimum_available_capacity, so that a worker near the threshold does not switch back and forth between states.
For the effect of each storage state on session recording, refer to Configure workers for session recording.
Capacity metrics
Workers report the following quantitative metrics to controllers.
A metric is null when Boundary cannot report it for the worker's current state.
| Metric | Description | null when the state is |
|---|---|---|
available_io_capacity | The number of additional file descriptors available to the worker process. | io_capacity_state is not applicable or unknown |
max_io_capacity | The maximum number of file descriptors the worker process can open, which is the RLIMIT_NOFILE limit. | io_capacity_state is not applicable or unknown |
available_storage_capacity | The available disk space, in bytes, in the worker's local recording storage. | local_storage_state is not configured or unknown |
max_storage_capacity | The total size, in bytes, of the volume that holds the worker's local recording storage. | local_storage_state is not configured or unknown |
Workers report the qualitative states every 10 seconds and the quantitative metrics every 15 seconds. Because the reports run on separate intervals, the metrics and the states can be briefly out of sync.