interface HttpConnectionPool
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppMesh.HttpConnectionPool |
![]() | software.amazon.awscdk.services.appmesh.HttpConnectionPool |
![]() | aws_cdk.aws_appmesh.HttpConnectionPool |
![]() | @aws-cdk/aws-appmesh » HttpConnectionPool |
Connection pool properties for HTTP listeners.
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',
});
Properties
Name | Type | Description |
---|---|---|
max | number | The maximum connections in the pool. |
max | number | The maximum pending requests in the pool. |
maxConnections
Type:
number
The maximum connections in the pool.
maxPendingRequests
Type:
number
The maximum pending requests in the pool.