@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-22T19:35:48.605Z")
public interface HttpConnectionPool
Example:
// A Virtual Node with a gRPC listener with a connection pool set Mesh mesh; VirtualNode node = VirtualNode.Builder.create(this, "node") .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(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder() .port(80) .connectionPool(HttpConnectionPool.builder() .maxConnections(100) .maxPendingRequests(10) .build()) .build()))) .build(); // A Virtual Gateway with a gRPC listener with a connection pool set VirtualGateway gateway = VirtualGateway.Builder.create(this, "gateway") .mesh(mesh) .listeners(List.of(VirtualGatewayListener.grpc(GrpcGatewayListenerOptions.builder() .port(8080) .connectionPool(GrpcConnectionPool.builder() .maxRequests(10) .build()) .build()))) .virtualGatewayName("gateway") .build();
Modifier and Type | Interface and Description |
---|---|
static class |
HttpConnectionPool.Builder
A builder for
HttpConnectionPool |
static class |
HttpConnectionPool.Jsii$Proxy
An implementation for
HttpConnectionPool |
Modifier and Type | Method and Description |
---|---|
static HttpConnectionPool.Builder |
builder() |
java.lang.Number |
getMaxConnections()
The maximum connections in the pool.
|
java.lang.Number |
getMaxPendingRequests()
The maximum pending requests in the pool.
|
java.lang.Number getMaxConnections()
Default: - none
java.lang.Number getMaxPendingRequests()
Default: - none
static HttpConnectionPool.Builder builder()
HttpConnectionPool.Builder
of HttpConnectionPool