diff --git a/conf/proxy.conf b/conf/proxy.conf index 8a67e50782724..653a8a9ca61cf 100644 --- a/conf/proxy.conf +++ b/conf/proxy.conf @@ -72,6 +72,12 @@ webServicePort=8080 # Port to use to server HTTPS request webServicePortTls= +# Number of threads used for Netty IO. Default is set to `2 * Runtime.getRuntime().availableProcessors()` +numIOThreads= + +# Number of threads used for Netty Acceptor. Default is set to `1` +numAcceptorThreads= + ### --- TLS config variables --- ### ## Note that some of the above TLS configs also apply to the KeyStore TLS configuration. diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java index faec6b6da07c1..b6371c55f93cb 100644 --- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java +++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java @@ -636,14 +636,14 @@ public class ProxyConfiguration implements PulsarConfiguration { @FieldContext( category = CATEGORY_SERVER, - doc = "Number of threads to use for Netty IO." + doc = "Number of threads used for Netty IO." + " Default is set to `2 * Runtime.getRuntime().availableProcessors()`" ) private int numIOThreads = 2 * Runtime.getRuntime().availableProcessors(); @FieldContext( category = CATEGORY_SERVER, - doc = "Number of threads to use for Netty Acceptor." + doc = "Number of threads used for Netty Acceptor." + " Default is set to `1`" ) private int numAcceptorThreads = 1; diff --git a/site2/docs/reference-configuration.md b/site2/docs/reference-configuration.md index 53709fe06e39d..b4565cdc58492 100644 --- a/site2/docs/reference-configuration.md +++ b/site2/docs/reference-configuration.md @@ -817,6 +817,8 @@ The [Pulsar proxy](concepts-architecture-overview.md#pulsar-proxy) can be config |tokenAudienceClaim| The token audience "claim" name, e.g. "aud". It is used to get the audience from token. If it is not set, the audience is not verified. || | tokenAudience | The token audience stands for this broker. The field `tokenAudienceClaim` of a valid token need contains this parameter.| | |haProxyProtocolEnabled | Enable or disable the [HAProxy](http://www.haproxy.org/) protocol. |false| +| numIOThreads | Number of threads used for Netty IO. | 2 * Runtime.getRuntime().availableProcessors() | +| numAcceptorThreads | Number of threads used for Netty Acceptor. | 1 | #### Deprecated parameters of Pulsar proxy The following parameters have been deprecated in the `conf/proxy.conf` file.