Skip to main content
Dotset CLI API Documentation / tollgate / HealthCheckConfig

Interface: HealthCheckConfig

Defined in: src/tollgate/policy/types.ts:223 Configuration for periodic health checks of upstream servers. Health checks help detect upstream server failures proactively, enabling faster failure mode activation.

Example

const healthConfig: HealthCheckConfig = {
  enabled: true,
  intervalMs: 15000,      // Check every 15 seconds
  timeoutMs: 3000,        // 3 second timeout per check
  failureThreshold: 2     // Mark unhealthy after 2 failures
};

Properties

enabled?

optional enabled: boolean;
Defined in: src/tollgate/policy/types.ts:225 Enable periodic health checks (default: true)

failureThreshold?

optional failureThreshold: number;
Defined in: src/tollgate/policy/types.ts:234 Number of consecutive failures before marking server unhealthy (default: 3)

intervalMs?

optional intervalMs: number;
Defined in: src/tollgate/policy/types.ts:228 Interval between health checks in milliseconds (default: 30000)

timeoutMs?

optional timeoutMs: number;
Defined in: src/tollgate/policy/types.ts:231 Timeout for each health check operation in milliseconds (default: 5000)