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
5 changes: 3 additions & 2 deletions docs/content/configuration/broker.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ Druid uses Jetty to serve HTTP requests.
|--------|-----------|-------|
|`druid.server.http.numThreads`|Number of threads for HTTP requests.|10|
|`druid.server.http.maxIdleTime`|The Jetty max idle time for a connection.|PT5m|
|`druid.broker.http.numConnections`|Size of connection pool for the Broker to connect to historical and real-time nodes. If there are more queries than this number that all need to speak to the same node, then they will queue up.|20|
|`druid.broker.http.readTimeout`|The timeout for data reads.|PT15M|
|`druid.broker.http.numConnections`|Size of connection pool for the Broker to connect to historical and real-time processes. If there are more queries than this number that all need to speak to the same node, then they will queue up.|20|
|`druid.broker.http.compressionCodec`|Compression codec the Broker uses to communicate with historical and real-time processes. May be "gzip" or "identity".|gzip|
|`druid.broker.http.readTimeout`|The timeout for data reads from historical and real-time processes.|PT15M|

#### Retry Policy

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<dependency>
<groupId>com.metamx</groupId>
<artifactId>http-client</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>
</dependency>
<dependency>
<groupId>com.metamx</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

public class DruidHttpClientConfig
{
private final String DEFAULT_COMPRESSION_CODEC = "gzip";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think uncompressed shuld be default

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to change the default in this PR.


@JsonProperty
@Min(0)
private int numConnections = 20;
Expand All @@ -41,6 +43,9 @@ public class DruidHttpClientConfig
@Min(1)
private int numMaxThreads = Math.max(10, (Runtime.getRuntime().availableProcessors() * 17) / 16 + 2) + 30;

@JsonProperty
private String compressionCodec = DEFAULT_COMPRESSION_CODEC;

public int getNumConnections()
{
return numConnections;
Expand All @@ -55,4 +60,9 @@ public int getNumMaxThreads()
{
return numMaxThreads;
}

public String getCompressionCodec()
{
return compressionCodec;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ public HttpClient get()
.builder()
.withNumConnections(config.getNumConnections())
.withReadTimeout(config.getReadTimeout())
.withWorkerCount(config.getNumMaxThreads());
.withWorkerCount(config.getNumMaxThreads())
.withCompressionCodec(HttpClientConfig.CompressionCodec.valueOf(config.getCompressionCodec().toUpperCase()));

if (getSslContextBinding() != null) {
builder.withSslContext(getSslContextBinding().getProvider().get());
Expand Down