This is an automated email from the ASF dual-hosted git repository.
mattisonchao pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.9 by this push:
new 51c89f8f1f7 [Improve][doc] Add config of IO and acceptor threads in
proxy (#15340)
51c89f8f1f7 is described below
commit 51c89f8f1f7ce3be455346d7e930e5b3f08d88ac
Author: Kai Wang <[email protected]>
AuthorDate: Fri May 6 21:40:51 2022 +0800
[Improve][doc] Add config of IO and acceptor threads in proxy (#15340)
* Add config of IO and acceptor threads in proxy
* Update doc
* Update site2/docs/reference-configuration.md
Co-authored-by: Anonymitaet <[email protected]>
* Update site2/docs/reference-configuration.md
Co-authored-by: Anonymitaet <[email protected]>
(cherry picked from commit da3f017240662fe9498dcc3d0f8513c02a740bb8)
---
conf/proxy.conf | 6 ++++++
.../java/org/apache/pulsar/proxy/server/ProxyConfiguration.java | 4 ++--
site2/docs/reference-configuration.md | 2 ++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/conf/proxy.conf b/conf/proxy.conf
index 4f98663afc1..77129ccc71d 100644
--- a/conf/proxy.conf
+++ b/conf/proxy.conf
@@ -68,6 +68,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 e440133aa40..d616bbd1ce4 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
@@ -569,14 +569,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 6fe8565f9e9..f8d1e87f890 100644
--- a/site2/docs/reference-configuration.md
+++ b/site2/docs/reference-configuration.md
@@ -732,6 +732,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 |
## ZooKeeper