Class GrpcConnectionPool
Connection pool properties for gRPC listeners.
Inheritance
System.Object
GrpcConnectionPool
Implements
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GrpcConnectionPool : Object, IGrpcConnectionPool
Syntax (vb)
Public Class GrpcConnectionPool
Inherits Object
Implements IGrpcConnectionPool
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
Constructors
GrpcConnectionPool() |
Properties
MaxRequests | The maximum requests in the pool. |
Constructors
GrpcConnectionPool()
public GrpcConnectionPool()
Properties
MaxRequests
The maximum requests in the pool.
public double MaxRequests { get; set; }
Property Value
System.Double
Remarks
Default: - none