mirror of https://github.com/apache/druid.git
Configurable HTTP compression. (#3759)
* Configurable HTTP compression. * Call real-time nodes real-time processes in docs.
This commit is contained in:
parent
d9807835f9
commit
943982b7b0
|
@ -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
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -128,7 +128,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>
|
||||
|
|
|
@ -30,6 +30,8 @@ import javax.validation.constraints.Min;
|
|||
|
||||
public class DruidHttpClientConfig
|
||||
{
|
||||
private final String DEFAULT_COMPRESSION_CODEC = "gzip";
|
||||
|
||||
@JsonProperty
|
||||
@Min(0)
|
||||
private int numConnections = 20;
|
||||
|
@ -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;
|
||||
|
@ -55,4 +60,9 @@ public class DruidHttpClientConfig
|
|||
{
|
||||
return numMaxThreads;
|
||||
}
|
||||
|
||||
public String getCompressionCodec()
|
||||
{
|
||||
return compressionCodec;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,8 @@ public class HttpClientModule implements Module
|
|||
.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());
|
||||
|
|
Loading…
Reference in New Issue