interface HttpHealthCheckOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppMesh.HttpHealthCheckOptions |
![]() | software.amazon.awscdk.services.appmesh.HttpHealthCheckOptions |
![]() | aws_cdk.aws_appmesh.HttpHealthCheckOptions |
![]() | @aws-cdk/aws-appmesh » HttpHealthCheckOptions |
Properties used to define HTTP Based healthchecks.
Example
const vpc = new ec2.Vpc(this, 'vpc');
const namespace = new cloudmap.PrivateDnsNamespace(this, 'test-namespace', {
vpc,
name: 'domain.local',
});
const service = namespace.createService('Svc');
declare const mesh: appmesh.Mesh;
const node = mesh.addVirtualNode('virtual-node', {
serviceDiscovery: appmesh.ServiceDiscovery.cloudMap(service),
listeners: [appmesh.VirtualNodeListener.http({
port: 8081,
healthCheck: appmesh.HealthCheck.http({
healthyThreshold: 3,
interval: cdk.Duration.seconds(5), // minimum
path: '/health-check-path',
timeout: cdk.Duration.seconds(2), // minimum
unhealthyThreshold: 2,
}),
})],
accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'),
});
Properties
Name | Type | Description |
---|---|---|
healthy | number | The number of consecutive successful health checks that must occur before declaring listener healthy. |
interval? | Duration | The time period between each health check execution. |
path? | string | The destination path for the health check request. |
timeout? | Duration | The amount of time to wait when receiving a response from the health check. |
unhealthy | number | The number of consecutive failed health checks that must occur before declaring a listener unhealthy. |
healthyThreshold?
Type:
number
(optional, default: 2)
The number of consecutive successful health checks that must occur before declaring listener healthy.
interval?
Type:
Duration
(optional, default: Duration.seconds(5))
The time period between each health check execution.
path?
Type:
string
(optional, default: /)
The destination path for the health check request.
timeout?
Type:
Duration
(optional, default: Duration.seconds(2))
The amount of time to wait when receiving a response from the health check.
unhealthyThreshold?
Type:
number
(optional, default: 2)
The number of consecutive failed health checks that must occur before declaring a listener unhealthy.