aws-cdk-lib.aws_appmesh.GrpcConnectionPool

interface GrpcConnectionPool

LanguageType name
.NETAmazon.CDK.AWS.AppMesh.GrpcConnectionPool
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#GrpcConnectionPool
Javasoftware.amazon.awscdk.services.appmesh.GrpcConnectionPool
Pythonaws_cdk.aws_appmesh.GrpcConnectionPool
TypeScript (source)aws-cdk-lib » aws_appmesh » GrpcConnectionPool

Connection pool properties for gRPC 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

NameTypeDescription
maxRequestsnumberThe maximum requests in the pool.

maxRequests

Type: number

The maximum requests in the pool.