Cloudflare Load Balancing
TCP health checks
You can configure a Cloudflare load balancer to probe any TCP port for an accepted connection, which is in addition to HTTP and HTTPS probing capabilities.
Health checks are optional within a load balancer. However, without a health check, the load balancer will distribute traffic to all origins in the first pool. With the health checks enabled, hosts that have gone into an error state will not receive traffic, maintaining uptime. This allows you to enable intelligent failover within a pool of hosts or amongst multiple pools.
The example below shows a TCP health check configuration for an application running on port 2408 with a refresh rate every 30 seconds. You can configure TCP health checks through the dashboard or through Cloudflare’s API. Under Advanced health check settings:
TCP health check - Dashboard example
Field Value Type TCP Port 2408 Field Value Interval 30 Timeout 5 seconds Retries 2
TCP health check - API example
Under Advanced health check settings:
Weight configured within a load balancer pool will be honored with load balancing through Spectrum.
Requirements and limitations
UDP health checks are only available with public monitoring. TCP can be used with both public and private monitoring.
- This feature requires an Enterprise plan. If you would like to upgrade, contact your account team.