Skip to content

Commit

Permalink
[Improve][doc] Add config of IO and acceptor threads in proxy (apache…
Browse files Browse the repository at this point in the history
…#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]>
  • Loading branch information
Demogorgon314 and Anonymitaet authored May 6, 2022
1 parent a1fb200 commit da3f017
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 @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
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 @@ -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.
Expand Down

0 comments on commit da3f017

Please sign in to comment.