Monitors
A monitor issues health monitor requests at regular intervals to evaluate the health of each endpoint within a pool.
When a pool becomes unhealthy, your load balancer takes that pool out of the endpoint rotation.
flowchart RL accTitle: Load balancing monitor flow accDescr: Monitors issue health monitor requests, which validate the current status of servers within each pool. Monitor -- Health Monitor ----> Endpoint2 Endpoint2 -- Response ----> Monitor subgraph Pool Endpoint1((Endpoint 1)) Endpoint2((Endpoint 2)) end
Health monitor requests that result in a status change for an endpoint are recorded as events in the Load Balancing event logs.
For an up-to-date list of monitor properties, refer to Monitor properties in our API documentation.
For step-by-step guidance, refer to Create monitors.
When you attach a monitor to a pool, you can select multiple regions to increase reporting accuracy.
For each option selected in a pool’s Health Monitor Regions, Cloudflare sends health monitor requests from three separate data centers in that region.
If the majority of data centers for that region pass the health monitor requests, that region is considered healthy. If the majority of regions is healthy, then the endpoint itself will be considered healthy.
All Data Centers (Enterprise only)
Health monitor probes are sent from every single data center in Cloudflare’s network to the endpoints within the associated pool. This allows probes to hit each endpoint during intervals set by the customer.
All Regions
Three health monitor probes per region are sent to each endpoint in the associated pool. There are a total of 13 regions, resulting in 39 probes.
Regional
Three health monitor probes are sent from each specified region within the pool configuration.
The host headers used on health monitor requests can be configured either on the monitor itself or on the endpoints within a pool.
When a host header is specified both on the monitor and on the endpoint, the host header configured on the endpoint takes precedence over the host header configured on the monitor.
When no host header is specified, Cloudflare uses the Endpoint Address configured on the endpoints as the host header for the health monitor requests.
For more details, refer to Override HTTP Host headers.
The Cloudflare API supports the following commands for monitors. Examples are given for user-level endpoint but apply to the account-level endpoint as well.
Command | Method | Endpoint |
---|---|---|
Create Monitor | POST | accounts/:account_id/load_balancers/monitors |
Delete Monitor | DELETE | accounts/:account_id/load_balancers/monitors/:id |
List Monitors | GET | accounts/:account_id/load_balancers/monitors |
Monitor Details | GET | accounts/:account_id/load_balancers/monitors/:id |
Overwrite specific properties | PATCH | accounts/:account_id/load_balancers/monitors/:id |
Overwrite existing monitor | PUT | accounts/:account_id/load_balancers/monitors/:id |
Preview Monitor | POST | accounts/:account_id/load_balancers/monitors/:id/preview |
Cloudflare Load Balancing supports public monitoring for HTTP, HTTPS, TCP, UDP, ICMP, ICMP ping, and SMTP.
Load Balancing also supports private monitoring for HTTP, HTTPS, and TCP.