enum DnsResponseType
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppMesh.DnsResponseType |
Java | software.amazon.awscdk.services.appmesh.DnsResponseType |
Python | aws_cdk.aws_appmesh.DnsResponseType |
TypeScript (source) | @aws-cdk/aws-appmesh » DnsResponseType |
Enum of DNS service discovery response type.
Example
// A Virtual Node with a gRPC listener with a connection pool set
declare const mesh: appmesh.Mesh;
const node = new appmesh.VirtualNode(this, 'node', {
mesh,
// DNS service discovery can optionally specify the DNS response type as either LOAD_BALANCER or ENDPOINTS.
// LOAD_BALANCER means that the DNS resolver returns a loadbalanced set of endpoints,
// whereas ENDPOINTS means that the DNS resolver is returning all the endpoints.
// By default, the response type is assumed to be LOAD_BALANCER
serviceDiscovery: appmesh.ServiceDiscovery.dns('node', appmesh.DnsResponseType.ENDPOINTS),
listeners: [appmesh.VirtualNodeListener.http({
port: 80,
connectionPool: {
maxConnections: 100,
maxPendingRequests: 10,
},
})],
});
// A Virtual Gateway with a gRPC listener with a connection pool set
const gateway = new appmesh.VirtualGateway(this, 'gateway', {
mesh,
listeners: [appmesh.VirtualGatewayListener.grpc({
port: 8080,
connectionPool: {
maxRequests: 10,
},
})],
virtualGatewayName: 'gateway',
});
Members
Name | Description |
---|---|
LOAD_BALANCER | DNS resolver returns a loadbalanced set of endpoints and the traffic would be sent to the given endpoints. |
ENDPOINTS | DNS resolver is returning all the endpoints. |
LOAD_BALANCER
DNS resolver returns a loadbalanced set of endpoints and the traffic would be sent to the given endpoints.
It would not drain existing connections to other endpoints that are not part of this list.
ENDPOINTS
DNS resolver is returning all the endpoints.
This also means that if an endpoint is missing, it would drain the current connections to the missing endpoint.