Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ All Druid components can communicate with each other over HTTP.
|`druid.global.http.clientConnectTimeout`|Connect timeout (in milliseconds) for the HTTP client used to forward management API requests between Druid services. On the Router, this covers forwarding management API calls to the Coordinator or Overlord. On the Coordinator, this covers proxying `/druid/indexer/*` requests to the Overlord (when they run as separate processes). Does not affect Router query proxying to Brokers (see `druid.router.http.clientConnectTimeout`) or direct RPC connections between services (see `connectTimeout`).|500|
|`druid.global.http.connectTimeout`|Connect timeout for the HTTP client used for most direct RPC between Druid services. This covers, among other things, Overlord-to-task and supervisor-to-task calls in the indexing service, Coordinator lookup management, dynamic config sync between services, MSQ tasks reading from data servers, and general Coordinator/Overlord/Broker service clients. Does not affect Broker-to-Historical query dispatch (see `druid.broker.http.connectTimeout`) or request forwarding (see `clientConnectTimeout`).|`PT10S`|
|`druid.global.http.allocator`|Netty memory allocator used by the direct-RPC HTTP client. Accepts `adaptive` (adaptive between `pooled` and `unpooled` based on load), `pooled`, or `unpooled`.|`adaptive`|
|`druid.global.http.poolImplementation`|How the connection pool tracks demand, never exceeding `numConnections` either way. With `adaptive`, a request discards every stale or broken connection it walks past and opens a new one only once none is left, so the pool falls back to the number of connections the traffic actually needs. With `retaining`, the pool holds on to every connection it has opened, replacing a stale or broken one by a fresh one, one for one, so it stays at its high-water mark.|`adaptive`|
|`druid.global.http.poolImplementation`|How the connection pool tracks demand, never exceeding `numConnections` either way. With `adaptive`, a request discards every stale or broken connection it walks past and opens a new one only once none is left, so the pool falls back to the number of connections the traffic actually needs. With `retaining`, the pool holds on to every connection it has opened, replacing a stale or broken one by a fresh one, one for one, so it stays at its high-water mark.|`retaining`|

### Common endpoints configuration

Expand Down Expand Up @@ -1857,7 +1857,7 @@ client has the following configuration options.
|`druid.broker.http.numMaxThreads`|`Maximum number of I/O worker threads|(number of cores) * 3 / 2 + 1`|
|`druid.broker.http.connectTimeout`|Connect timeout for the HTTP client the Broker uses to dispatch queries to Historical and real-time processes.|`PT10S`|
|`druid.broker.http.allocator`|Netty memory allocator used by the direct-RPC HTTP client. Accepts `adaptive` (adaptive between `pooled` and `unpooled` based on load), `pooled`, or `unpooled`.|`adaptive`|
|`druid.broker.http.poolImplementation`|How the connection pool tracks demand, never exceeding `numConnections` either way. With `adaptive`, a query discards every stale or broken connection it walks past and opens a new one only once none is left, so the pool falls back to the number of connections the traffic actually needs. With `retaining`, the pool holds on to every connection it has opened, replacing a stale or broken one by a fresh one, one for one, so it stays at its high-water mark.|`adaptive`|
|`druid.broker.http.poolImplementation`|How the connection pool tracks demand, never exceeding `numConnections` either way. With `adaptive`, a query discards every stale or broken connection it walks past and opens a new one only once none is left, so the pool falls back to the number of connections the traffic actually needs. With `retaining`, the pool holds on to every connection it has opened, replacing a stale or broken one by a fresh one, one for one, so it stays at its high-water mark.|`retaining`|


##### Retry policy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public static class Builder
{
private int numConnections = 1;
private boolean eagerInitialization = true;
private ResourcePool.Implementation poolImplementation = ResourcePool.Implementation.ADAPTIVE;
private ResourcePool.Implementation poolImplementation = ResourcePool.Implementation.RETAINING;
private SSLContext sslContext = null;
private HttpClientProxyConfig proxyConfig = null;
private Duration readTimeout = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class DruidHttpClientConfig
private Boolean eagerInitialization = null;

@JsonProperty
private ResourcePool.Implementation poolImplementation = ResourcePool.Implementation.ADAPTIVE;
private ResourcePool.Implementation poolImplementation = ResourcePool.Implementation.RETAINING;

@JsonProperty
private long clientConnectTimeout = TimeUnit.MILLISECONDS.toMillis(500);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ public class DruidHttpClientConfigTest
private static final String PROPERTY_BASE = "druid.broker.http";

@Test
public void testPoolImplementationDefaultsToAdaptive()
public void testPoolImplementationDefaultsToRetaining()
{
Assertions.assertEquals(ResourcePool.Implementation.ADAPTIVE, configure(new Properties()).getPoolImplementation());
Assertions.assertEquals(ResourcePool.Implementation.RETAINING, configure(new Properties()).getPoolImplementation());
}

@Test
public void testPoolImplementationCanBeSwitchedBackToRetaining()
public void testPoolImplementationCanBeSwitchedToAdaptive()
{
final Properties properties = new Properties();
properties.setProperty(PROPERTY_BASE + ".poolImplementation", "retaining");
properties.setProperty(PROPERTY_BASE + ".poolImplementation", "adaptive");

Assertions.assertEquals(ResourcePool.Implementation.RETAINING, configure(properties).getPoolImplementation());
Assertions.assertEquals(ResourcePool.Implementation.ADAPTIVE, configure(properties).getPoolImplementation());
}

/**
Expand All @@ -59,9 +59,9 @@ public void testPoolImplementationCanBeSwitchedBackToRetaining()
public void testPoolImplementationIsNotCaseSensitive()
{
final Properties properties = new Properties();
properties.setProperty(PROPERTY_BASE + ".poolImplementation", "RETAINING");
properties.setProperty(PROPERTY_BASE + ".poolImplementation", "ADAPTIVE");

Assertions.assertEquals(ResourcePool.Implementation.RETAINING, configure(properties).getPoolImplementation());
Assertions.assertEquals(ResourcePool.Implementation.ADAPTIVE, configure(properties).getPoolImplementation());
}

/**
Expand Down
Loading