Class HealthCheckOptions
Specifies health check settings for cluster IngressRule rules.
note
Health check settings are currently honored only for clusters hosted in cloud environments. You'll need to manually configure your router for on-premise clusters.
Namespace: Neon.Kube.ClusterDef
Assembly: Neon.Kube.dll
Syntax
public class HealthCheckOptions
Remarks
NEONKUBE clusters deployed to cloud hosting environments include a cloud provided load balancer that routes external network traffic to cluster nodes. Currently, only TCP routing is supported. HTTP and HTTPS traffic is routed as TCP because we don't want to add the complexity of managing TLS certificates at the load balancer and for ingress rules, we really want Isto to handle Cluster routing internally. UDP is not currently supported by Isto, so we don't support it either.
You can use this to specify default health check options in NetworkOptions or you can override default options for specific IngressRule rules.
Load balancers perform health checks at the interval specified by IntervalSeconds, which defaults to 10 seconds. The health check method is simple: the load balancer simply tries to establish a TCP connection at the target port on the node. The application is considered healthy when a connection can be established.
The load balancer considers a node endpoint to be unhealthy when at least ThresholdCount consecutive health checks have failed. This defaults to 2. The load balancer will stop sending traffic to unhealthy node endpoints until they become healthy again.
Properties
IntervalSeconds
Specifies the interval in seconds between load balancer health checks. This defaults to 10 seconds and must be in the range of 10...300 seconds.
Declaration
[JsonProperty(PropertyName = "IntervalSeconds", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "intervalSeconds", ApplyNamingConventions = false)]
public int IntervalSeconds { get; set; }
Property Value
Type | Description |
---|---|
int |
ThresholdCount
Specifies the number of consecutive failed health checks before the load balancer will consider the node endpoint to be unhealthy. This defaults to 2 and must be in the range of 2...10.
Declaration
[JsonProperty(PropertyName = "ThresholdCount", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "thresholdCount", ApplyNamingConventions = false)]
public int ThresholdCount { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
Validate(ClusterDefinition, string)
Verifies the health settings.
Declaration
public void Validate(ClusterDefinition clusterDefinition, string name)
Parameters
Type | Name | Description |
---|---|---|
ClusterDefinition | clusterDefinition | The cluster definition. |
string | name | Used to identify where the health check property being checked originated when reporting errors. |
Exceptions
Type | Condition |
---|---|
ClusterDefinitionException | Thrown for invalid settings. |