In LogService, you can use parameters to control the behavior of a LogService cluster, such as load balancing, log management, and resource allocation.
When you first bootstrap a LogService cluster, you must specify certain required parameters. If no reasonable default value is provided or a required parameter is not set, the bootstrap cannot be completed. These required parameters must be explicitly specified in the startup configuration file (etc/config.toml) or by using startup parameters (-g).
LogService runtime parameters are defined in the ServerConfig structure and are loaded from the startup configuration file in TOML format. Some parameters can be modified online by using the HTTP interface.
Parameter scope
LogService parameters are divided into two scopes: cluster-level and server-level:
Scope |
Description |
|---|---|
| cluster | Cluster-level configurations are persisted by the LogServiceManager (LM) to the t_parameter_info table and apply to all nodes in the cluster. |
| server | Node-level configurations take effect only locally. |
Parameter effective mode
Effective mode |
Description |
|---|---|
| dynamic | The parameter can be modified by using the HTTP /set interface and takes effect immediately. |
| static | The parameter can be modified and persisted by using the HTTP /set interface. Semantically, the change takes effect only after the process is restarted. Currently, this is only a semantic annotation, and the runtime does not forcibly prevent immediate write. |
| readonly | The parameter is read-only at runtime and cannot be changed after the process is started. |
Required parameters for LogService cluster bootstrap
The following parameters have no reasonable default values or cannot be left unset during bootstrap. They must be explicitly specified in the startup configuration file (etc/config.toml) or by using startup parameters (-g).
Parameter |
Description |
Type |
Default value |
Scope |
Effective mode |
|---|---|---|---|---|---|
| cluster_id | The unique identifier of the cluster, which must be the same on all nodes. The default value 0 has no practical meaning; you must specify a valid cluster ID. | u64 | 0 | server | readonly |
| local_ip | The IP address of each node for external services. The default value 0.0.0.0 is suitable only for standalone testing. For cluster deployment, it must be set to the actual routable IP address of the node. | String | "0.0.0.0" | server | readonly |
| local_storage_dir | The path of the local data directory. Before bootstrapping, it is checked that this directory must exist and be empty (only the log_pool subdirectory is allowed). | String | "store" | server | readonly |
Note
- object_store_url, region, and az are passed through POST /bootstrap request parameters and do not need to be set in config.toml or -g.
- For a complete list of LogService cluster parameters, see LogService parameters overview.
References
For more information about LogService parameter-related operations, see: