Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
popduke committed Sep 14, 2024
1 parent 47f52cf commit 3dfd5e6
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 15 deletions.
2 changes: 2 additions & 0 deletions website/docs/04_cluster/1_standardcluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ clusterConfig:
seedEndpoints:
```
**Note**: In addition to the `clusterConfig.port`, BifroMQ uses dedicated ports for inter-cluster RPC communication, such as `RPCServerConfig.port`. If these ports are not explicitly set in the configuration file, they will be randomly selected, which may cause communication failures in environments with firewalls. In such cases, please refer to the [full configuration file](../07_admin_guide/01_configuration/1_config_file_manual.md) to specify these ports explicitly and adjust your firewall rules accordingly.

### Setting Seed Nodes

Before setting up the cluster, you need to specify seedPoints in a comma-separated format of `<ADDRESS>:<PORT>`, for example:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/06_plugin/1_auth_provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ message MQTT3AuthData{
bool isMQIsdp = 1; // true indicates the client is using MQTT 3.1
optional string username = 2; // username specified by the client in Connect
optional bytes password = 3; // password specified by the client in Connect
optional bytes cert = 4; // TLS certificate used by the client
optional bytes cert = 4; // TLS certificate used by the client in Base64 encoding
optional string clientId = 5; // client identifier specified by the client in Connect
string remoteAddr = 6; // source address of the client
uint32 remotePort = 7; // port of the client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ The complete configuration file is defined by a set of configuration objects, wi
| `mqttServerConfig.wssListener.wsPath` | String | "/mqtt" | Access path for MQTT over WebSocket Secure connection method. |
| `mqttServerConfig.wssListener.sslConfig` | ServerSSLContextConfig | null | SSL configuration for MQTT over WebSocket Secure connection method. Refer to the settings of the ServerSSLContextConfig object. |
| `rpcClientConfig.workerThreads` , `baseKVClientConfig.workerThreads` | Integer | processor cores | The number of worker threads when communicating between nodes as a client via RPC. |
| `rpcClientConfig.enableSSL`,`baseKVClientConfig.enableSSL` | SSLContextConfig | false | Enable SSL at client side. |
| `rpcClientConfig.sslConfig`,`baseKVClientConfig.sslConfig` | SSLContextConfig | null | SSL configuration when Secure RPC is enabled. Refer to the settings of the SSLContextConfig object. |
| `rpcServerConfig.host`,`baseKVServerConfig.host` | String | | See the rule description for ClusterConfig.host. |
| `rpcServerConfig.port`,`baseKVServerConfig.port` | Integer | 0 | See the rule description for ClusterConfig.port. |
| `rpcServerConfig.workerThreads`,`baseKVServerConfig.workerThreads` | Integer | 2 | The number of worker threads when communicating between nodes as a server via RPC. |
| `rpcServerConfig.enableSSL`,`baseKVServerConfig.enableSSL` | ServerSSLContextConfig | false | Enable SSL at server side |
| `rpcServerConfig.sslConfig`,`baseKVServerConfig.sslConfig` | ServerSSLContextConfig | null | SSL configuration when Secure RPC is enabled. Refer to the settings of the ServerSSLContextConfig object. |
| `stateStoreConfig.queryThreads` | Integer | min(available cores/2, 2) | The number of threads for the built-in state storage service to execute query type requests. |
| `stateStoreConfig.tickerThreads` | Integer | min(available cores/20, 1) | The number of threads for the built-in state storage service to perform periodic tick operations. |
Expand Down Expand Up @@ -83,14 +85,16 @@ The complete configuration file is defined by a set of configuration objects, wi

## SSLContextConfig && ServerSSLContextConfig

SSLContextConfig is used to set the configuration parameters for client SSL connections. ServerSSLContextConfig is used to set the configuration parameters for server SSL connections.
SSLContextConfig is used to configure the SSL connection parameters for the client, while ServerSSLContextConfig is used to configure the SSL connection parameters for the server.

| Configuration Name | Value Type | Default Value | Description |
|--------------------|------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `certFile` | String | null | The filename of the public certificate for the client or server. |
| `keyFile` | String | null | The filename of the private certificate for the client or server. |
| `trustCertsFile` | String | null | The filename of the root certificate for the client or server. |
| `clientAuth` | String | "OPTIONAL" | Only valid for ServerSSLContextConfig. Whether the server requires client verification. Possible values include: NONE: No verification required; OPTIONAL: Server requests client verification, but if the client does not provide a certificate, it will not fail; REQUIRE: Server requires client verification, and if the client does not provide a certificate, it will fail. |
If you leave SSLContextConfig or ServerSSLContextConfig set to null while the corresponding `enable` flags are set to true, a self-signed certificate will be generated, which is not recommended for production environments.

| Configuration Name | Value Type | Default Value | Description |
|--------------------|------------|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `certFile` | String | null | The filename of the public certificate for the client or server. |
| `keyFile` | String | null | The filename of the private key for the client or server. |
| `trustCertsFile` | String | null | The filename of the root certificate for the client or server. If null, peer certification will not be verified, when clientAuth is OPTIONAL or REQUIRE. |
| `clientAuth` | String | "OPTIONAL" | Only valid for ServerSSLContextConfig. Whether the server requires client verification. Possible values include: <br/>NONE: No verification required; <br/>OPTIONAL: Server requests client verification, but if the client does not provide a certificate, it will not fail; <br/>REQUIRE: Server requires client verification, and if the client does not provide a certificate, it will fail. |

## StorageEngineConfig

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ title: "部署StandardCluster"
本节演示 3 节点集群的部署过程。类似于 Linux 上的部署 [Linux 上的部署](../02_installation/2_linux.md), 您首先需要解压下载的压缩包。

### 配置

默认情况下提供了一个配置文件,其中包含以下设置:

```yaml
Expand All @@ -38,20 +39,27 @@ clusterConfig:
seedEndpoints:
```
**注意**: 除了 `clusterConfig.port` 之外,BifroMQ 还使用专用端口进行集群间的 RPC 通信,例如 `RPCServerConfig.port`。如果这些端口未在配置文件中明确指定,系统将随机选择可用端口,这可能会导致在有防火墙的环境中集群间的 RPC 通信失败。在这种情况下,请参考
完整的[配置文件](../07_admin_guide/01_configuration/1_config_file_manual.md),明确指定这些端口,并调整相应的防火墙规则。

### 设置种子节点

在设置集群之前,您需要以逗号分隔的 `<ADDRESS>:<PORT>`格式指定种子节点,例如:

```yaml
clusterConfig.seedEndpoints: ${NODE1_ADDR}:${PORT},${NODE2_ADDR}:${PORT},${NODE3_ADDR}:${PORT}
```

有关详细的配置信息,请参阅 BifroMQ [配置文档](../07_admin_guide/01_configuration/1_config_file_manual.md).

### 启动节点

使用以下命令启动节点:

```shell
./bin/standalone.sh start
```

建议首先启动 'bootstrap' 节点。

### 检查集群状态
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ message MQTT3AuthData{
bool isMQIsdp = 1; // true indicates the client is using MQTT 3.1
optional string username = 2; // username specified by the client in Connect
optional bytes password = 3; // password specified by the client in Connect
optional bytes cert = 4; // TLS certificate used by the client
optional bytes cert = 4; // TLS certificate used by the client in Base64 encoding
optional string clientId = 5; // client identifier specified by the client in Connect
string remoteAddr = 6; // source address of the client
uint32 remotePort = 7; // port of the client
Expand Down
Loading

0 comments on commit 3dfd5e6

Please sign in to comment.