Envoy 启动相关参数整理
本篇属于Envoy代码的阅读笔记,整理了envoy启动所使用到的参数信息,代码实现在类 OptionsImpl 中,使用了TCLAP来进行参数的行解析处理。
// 文件路径如下所示:
"source/server/options_impl.h"
"source/server/options_impl.cc"
实现逻辑在下面的构造函数中:
OptionsImpl::OptionsImpl(std::vector<std::string> args,
const HotRestartVersionCb& hot_restart_version_cb,
spdlog::level::level_enum default_log_level) {
......
// 参数会先设置一个默认值,如果envoy的启动参数里面设置了对应的参数,会替换掉这些默认数据
}
TCLAP的相关知识可以参考:C++ 命令行解析库TCLAP
参数列表:
序号 | 参数名称 | 参数描述 | 类型 | 默认值 |
---|---|---|---|---|
1 | base-id | "base ID so that multiple envoys can run on the same host if needed" | uint32_t | 0 |
2 | use-dynamic-base-id | "the server chooses a base ID dynamically. Supersedes a static base ID. May not be used when the restart epoch is non-zero." | bool | false |
3 | base-id-path | "path to which the base ID is written" | string | "" |
4 | concurrency | "# of worker threads to run" | uint32_t | std::thread::hardware_concurrency() |
5 | config-path | "Path to configuration file" | string | "" |
6 | config-yaml | "Inline YAML configuration, merges with the contents of --config-path" | string | "" |
7 | bootstrap-version | "API version to parse the bootstrap config as (e.g. 3). If ""unset, all known versions will be attempted" | uint32_t | 0 |
8 | allow-unknown-fields | "allow unknown fields in static configuration (DEPRECATED)" | bool | false |
9 | allow-unknown-static-fields | "allow unknown fields in static configuration" | bool | false |
10 | reject-unknown-dynamic-fields | bool | false | |
11 | ignore-unknown-dynamic-fields | "ignore unknown fields in dynamic configuration" | bool | false |
12 | admin-address-path | "Admin address path" | string | "" |
13 | local-address-ip-version | The local IP address version (v4 or v6)." | string | "v4" |
14 | log-level | log_levels_string | string | spdlog::level::level_string_views[default_log_level].data() |
15 | component-log-level | component_log_level_string | string | "" |
16 | log-format | log_format_string | string | Logger::Logger::DEFAULT_LOG_FORMAT |
17 | log-format-escaped | "Escape c-style escape sequences in the application logs" | bool | false |
18 | enable-fine-grain-logging | "Logger mode: enable file level log control(Fancy Logger)or not" | bool | false |
19 | log-path | "Path to logfile" | string | "" |
20 | restart-epoch | "hot restart epoch #" | uint32_t | 0 |
21 | hot-restart-version | "hot restart compatibility version" | bool | false |
22 | service-cluster | "Cluster name" | string | "" |
23 | service-node | "Node name" | string | "" |
24 | service-zone | "Zone name" | string | "" |
25 | file-flush-interval-msec | "Interval for log flushing in msec" | uint32_t | 10000ms |
26 | drain-time-s | "Hot restart and LDS removal drain time in seconds" | uint32_t | 600ms |
27 | drain-strategy | "Hot restart drain sequence behaviour, one of 'gradual' (default) or 'immediate'." | string | "gradual" |
28 | parent-shutdown-time-s | "Hot restart parent shutdown time in seconds" | uint32_t | 900ms |
29 | mode | "One of 'serve' (default; validate configs and then serve ""traffic normally) or 'validate' (validate configs and exit)." | string | "serve" |
30 | disable-hot-restart | "Disable hot restart functionality" | bool | false |
31 | enable-mutex-tracing | "Enable mutex contention tracing functionality" | bool | false |
32 | cpuset-threads | "Get the default # of worker threads from cpuset size" | bool | false |
33 | disable-extensions | "Comma-separated list of extensions to disable" | string | "" |
34 | socket-path | "Path to hot restart socket file" | string | "@envoy_domain_socket" |
35 | socket-mode | "Socket file permission" | string | "600" |
36 | enable-core-dump | "Enable core dumps" | bool | false |
参考:istio-proxy 1.11.2版本的envoy 代码
相关文章
- 解决docker下载镜像速度过慢_docker镜像启动后又迅速结束
- Docker服务的启动命令(systemctl start docker)
- JVM 的 noverify 启动参数
- centos7 systemctl 添加 uwsgi(开机启动)
- 系统SAP在Linux系统上的开启之旅(sap启动linux)
- MongoDB 启动参数指南(mongodb启动参数)
- Linux进程启动:配置参数指南(linux进程启动参数)
- Linux下进程开启的参数优化(linux进程启动参数)
- Linux 进程启动:改变参数的威力(linux进程启动参数)
- Win7系统中Telnet服务的安装和启动
- MongoDB:快速启动指南(mongodb 如何启动)
- Linux下快速启动MySQL服务器(linux启动mysql)
- 有检查Redis服务器是否已启动(查redis启动了没)
- 如何快速启动Redis(下载redis后怎么打开)
- 启动Redis以指定IP参数开启连接(启动redis 指定ip)
- 一些mysql启动参数的说明和优化方法
- php启动时候提示PHPstartup的解决方法