Skip to content

Commit

Permalink
[Improve][doc] Add config of IO and acceptor threads in proxy (#15340)
Browse files Browse the repository at this point in the history
* 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 da3f017)
  • Loading branch information
Demogorgon314 authored and codelipenghui committed May 20, 2022
1 parent fd44570 commit 29104a7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions conf/proxy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,14 +559,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;
Expand Down
2 changes: 2 additions & 0 deletions site2/docs/reference-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,8 @@ The [Pulsar proxy](concepts-architecture-overview.md#pulsar-proxy) can be config
| tokenAudience | The token audience stands for this broker. The field `tokenAudienceClaim` of a valid token need contains this parameter.| |
| proxyLogLevel | Set the Pulsar Proxy log level. <li> If the value is set to 0, no TCP channel information is logged. <li> If the value is set to 1, only the TCP channel information and command information (without message body) are parsed and logged. <li> If the value is set to 2, all TCP channel information, command information, and message body are parsed and logged. | 0 |
|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

Expand Down

0 comments on commit 29104a7

Please sign in to comment.