pub struct HealthCheck {
pub protocol: String,
pub port: usize,
pub path: String,
pub check_interval_seconds: usize,
pub response_timeout_seconds: usize,
pub unhealthy_threshold: usize,
pub healthy_threshold: usize,
}Expand description
This exists in the health_check field of a droplet.
Health checks are used to tell if a Droplet is responding and should receive traffic. The Load Balancer will automatically stop sending traffic to unresponsive Droplets. You may specify the protocol, port, and path for a health check as well as additional setting such as the check interval and response timeout.
Fields§
§protocol: StringThe protocol used for health checks sent to the backend Droplets. The possible values are “http” or “tcp”.
port: usizeAn integer representing the port on the backend Droplets on which the health check will attempt a connection.
path: StringThe path on the backend Droplets to which the Load Balancer instance will send a request.
check_interval_seconds: usizeThe number of seconds between between two consecutive health checks.
response_timeout_seconds: usizeThe number of seconds the Load Balancer instance will wait for a response until marking a health check as failed.
unhealthy_threshold: usizeThe number of times a health check must fail for a backend Droplet to be marked “unhealthy” and be removed from the pool.
healthy_threshold: usizeThe number of times a health check must pass for a backend Droplet to be marked “healthy” and be re-added to the pool.
Trait Implementations§
Source§impl Clone for HealthCheck
impl Clone for HealthCheck
Source§fn clone(&self) -> HealthCheck
fn clone(&self) -> HealthCheck
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more