Class DnsResponseType
Enum of DNS service discovery response type.
Inheritance
System.Object
DnsResponseType
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.AWS.AppMesh.dll
Syntax (csharp)
public sealed class DnsResponseType : Enum
Syntax (vb)
Public NotInheritable Class DnsResponseType
Inherits
Enum
Remarks
ExampleMetadata: infused
Examples
// A Virtual Node with a gRPC listener with a connection pool set
Mesh mesh;
var node = new VirtualNode(this, "node", new VirtualNodeProps {
Mesh = 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 = ServiceDiscovery.Dns("node", DnsResponseType.ENDPOINTS),
Listeners = new [] { VirtualNodeListener.Http(new HttpVirtualNodeListenerOptions {
Port = 80,
ConnectionPool = new HttpConnectionPool {
MaxConnections = 100,
MaxPendingRequests = 10
}
}) }
});
// A Virtual Gateway with a gRPC listener with a connection pool set
var gateway = new VirtualGateway(this, "gateway", new VirtualGatewayProps {
Mesh = mesh,
Listeners = new [] { VirtualGatewayListener.Grpc(new GrpcGatewayListenerOptions {
Port = 8080,
ConnectionPool = new GrpcConnectionPool {
MaxRequests = 10
}
}) },
VirtualGatewayName = "gateway"
});
Synopsis
Fields
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. |
value__ |
Fields
ENDPOINTS
DNS resolver is returning all the endpoints.
public const DnsResponseType ENDPOINTS
Field Value
Type | Description |
---|---|
DnsResponseType |
Remarks
This also means that if an endpoint is missing, it would drain the current connections to the missing endpoint.
LOAD_BALANCER
DNS resolver returns a loadbalanced set of endpoints and the traffic would be sent to the given endpoints.
public const DnsResponseType LOAD_BALANCER
Field Value
Type | Description |
---|---|
DnsResponseType |
Remarks
It would not drain existing connections to other endpoints that are not part of this list.
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |