Bootstrap¶
This proto is supplied via the -c
CLI flag and acts as the root
of the Envoy v2 configuration. See the v2 configuration overview for more detail.
Bootstrap¶
Bootstrap configuration overview.
{
"node": "{...}",
"static_resources": "{...}",
"dynamic_resources": "{...}",
"cluster_manager": "{...}",
"flags_path": "...",
"stats_sinks": [],
"stats_config": "{...}",
"stats_flush_interval": "{...}",
"watchdog": "{...}",
"tracing": "{...}",
"rate_limit_service": "{...}",
"runtime": "{...}",
"admin": "{...}"
}
- node
- (Node) Node identity to present to the management server and for instance identification purposes (e.g. in generated headers).
- static_resources
- (Bootstrap.StaticResources) Statically specified resources.
- dynamic_resources
- (Bootstrap.DynamicResources) xDS configuration sources.
- cluster_manager
- (ClusterManager) Configuration for the cluster manager which owns all upstream clusters within the server.
- flags_path
- (string) Optional file system path to search for startup flag files.
- stats_sinks
- (StatsSink) Optional set of stats sinks.
- stats_config
- (StatsConfig) Configuration for internal processing of stats.
- stats_flush_interval
- (Duration) Optional duration between flushes to configured stats sinks. For performance reasons Envoy latches counters and only flushes counters and gauges at a periodic interval. If not specified the default is 5000ms (5 seconds).
- watchdog
- (Watchdog) Optional watchdog configuration.
- tracing
- (Tracing) Configuration for an external tracing provider. If not specified, no tracing will be performed.
- rate_limit_service
- (RateLimitServiceConfig) Configuration for an external rate limit service provider. If not specified, any calls to the rate limit service will immediately return success.
- runtime
- (Runtime) Configuration for the runtime configuration provider. If not specified, a “null” provider will be used which will result in all defaults being used.
- admin
- (Admin, REQUIRED) Configuration for the local administration HTTP server.
Bootstrap.StaticResources¶
[Bootstrap.StaticResources proto]
{
"listeners": [],
"clusters": []
}
- listeners
- (Listener) Static Listeners. These listeners are available regardless of LDS configuration.
- clusters
- (Cluster) If a network based configuration source is specified for cds_config, it’s necessary to have some initial cluster definitions available to allow Envoy to know how to speak to the management server. These cluster definitions may not use EDS (i.e. they should be static IP or DNS-based).
Bootstrap.DynamicResources¶
[Bootstrap.DynamicResources proto]
{
"lds_config": "{...}",
"cds_config": "{...}",
"ads_config": "{...}",
"deprecated_v1": "{...}"
}
- lds_config
- (ConfigSource) All Listeners are provided by a single LDS configuration source.
- cds_config
- (ConfigSource) All post-bootstrap Cluster definitions are provided by a single CDS configuration source.
- ads_config
- (ApiConfigSource) A single ADS source may be optionally specified. This must have api_type GRPC. Only ConfigSources that have the ads field set will be streamed on the ADS channel.
- deprecated_v1
- (Bootstrap.DynamicResources.DeprecatedV1)
Bootstrap.DynamicResources.DeprecatedV1¶
[Bootstrap.DynamicResources.DeprecatedV1 proto]
{
"sds_config": "{...}"
}
- sds_config
- (ConfigSource) This is the global SDS config when using v1 REST for CDS/EDS.
LightstepConfig¶
Configuration for the LightStep tracer.
{
"collector_cluster": "...",
"access_token_file": "..."
}
- collector_cluster
- (string, REQUIRED) The cluster manager cluster that hosts the LightStep collectors.
ZipkinConfig¶
{
"collector_cluster": "...",
"collector_endpoint": "..."
}
- collector_cluster
- (string, REQUIRED) The cluster manager cluster that hosts the Zipkin collectors. Note that the Zipkin cluster must be defined in the Bootstrap static cluster resources.
- collector_endpoint
- (string, REQUIRED) The API endpoint of the Zipkin service where the spans will be sent. When using a standard Zipkin installation, the API endpoint is typically /api/v1/spans, which is the default value.
Tracing¶
The tracing configuration specifies global settings for the HTTP tracer used by Envoy. The configuration is defined by the Bootstrap tracing field. Envoy may support other tracers in the future, but right now the HTTP tracer is the only one supported.
{
"http": "{...}"
}
- http
- (Tracing.Http) Provides configuration for the HTTP tracer.
Tracing.Http¶
{
"name": "...",
"config": "{...}"
}
- name
- (string, REQUIRED) The name of the HTTP trace driver to instantiate. The name must match a supported HTTP trace driver. envoy.lightstep and envoy.zipkin are built-in trace drivers.
- config
- (Struct) Trace driver specific configuration which depends on the driver being instantiated. See the LightstepConfig and ZipkinConfig trace drivers for examples.
Admin¶
Administration interface operations documentation.
{
"access_log_path": "...",
"profile_path": "...",
"address": "{...}"
}
- access_log_path
- (string, REQUIRED) The path to write the access log for the administration server. If no access log is desired specify ‘/dev/null’.
- profile_path
- (string) The cpu profiler output path for the administration server. If no profile path is specified, the default is ‘/var/log/envoy/envoy.prof’.
- address
- (Address, REQUIRED) The TCP address that the administration server will listen on.
ClusterManager¶
Cluster manager architecture overview.
{
"local_cluster_name": "...",
"outlier_detection": "{...}",
"upstream_bind_config": "{...}",
"load_stats_config": "{...}"
}
- local_cluster_name
- (string) Name of the local cluster (i.e., the cluster that owns the Envoy running
this configuration). In order to enable zone aware routing this option must be set.
If local_cluster_name is defined then clusters must be defined in the Bootstrap
static cluster resources. This is unrelated to
the
--service-cluster
option which does not affect zone aware routing.
- outlier_detection
- (ClusterManager.OutlierDetection) Optional global configuration for outlier detection.
- upstream_bind_config
- (BindConfig) Optional configuration used to bind newly established upstream connections. This may be overridden on a per-cluster basis by upstream_bind_config in the cds_config.
- load_stats_config
- (ApiConfigSource) A management server endpoint to stream load stats to via StreamLoadStats. This must have api_type GRPC.
ClusterManager.OutlierDetection¶
[ClusterManager.OutlierDetection proto]
{
"event_log_path": "..."
}
- event_log_path
- (string) Specifies the path to the outlier event log.
StatsdSink¶
Stats configuration proto schema for built-in envoy.statsd sink.
{
"address": "{...}",
"tcp_cluster_name": "..."
}
- address
(Address) The UDP address of a running statsd compliant listener. If specified, statistics will be flushed to this address.
Precisely one of address, tcp_cluster_name must be set.
- tcp_cluster_name
(string) The name of a cluster that is running a TCP statsd compliant listener. If specified, Envoy will connect to this cluster to flush statistics.
Precisely one of address, tcp_cluster_name must be set.
StatsSink¶
Configuration for pluggable stats sinks.
{
"name": "...",
"config": "{...}"
}
- name
- (string) The name of the stats sink to instantiate. The name must match a supported stats sink. envoy.statsd is a built-in sink suitable for emitting to statsd.
- config
- (Struct) Stats sink specific configuration which depends on the sink being instantiated. See StatsdSink for an example.
TagSpecifier¶
Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics. This will only occur if any part of the name matches the regex provided with one or more capture groups.
{
"tag_name": "...",
"regex": "..."
}
- tag_name
(string) Attaches an identifier to the tag values to identify the tag being in the sink. Envoy has a set of default names and regexes to extract dynamic portions of existing stats, which can be found in well_known_names.h in the Envoy repository. If a tag_name is provided in the config with an empty regex, Envoy will attempt to find that name in its set of defaults and use the accompanying regex.
Note
If any default tags are specified twice, the config will be considered invalid.
- regex
(string) The first capture group identifies the portion of the name to remove. The second capture group (which will normally be nested inside the first) will designate the value of the tag for the statistic. If no second capture group is provided, the first will also be used to set the value of the tag. All other capture groups will be ignored.
Take for example, with a stat name
cluster.foo_cluster.upstream_rq_timeout
and{ "tag_name": "envoy.cluster_name", "regex": "^cluster\.((.+?)\.)" }
Note that the regex will remove
foo_cluster.
making the tag extracted namecluster.upstream_rq_timeout
and the tag value forenvoy.cluster_name
will befoo_cluster
(note: there will be no.
character because of the second capture group).An example with two regexes and stat name
http.connection_manager_1.user_agent.ios.downstream_cx_total
:[ { "tag_name": "envoy.http_user_agent", "regex": "^http(?=\.).*?\.user_agent\.((.+?)\.)\w+?$" }, { "tag_name": "envoy.http_conn_manager_prefix", "regex": "^http\.((.*?)\.)" } ]
The first regex will remove
ios.
, leaving the tag extracted namehttp.connection_manager_1.user_agent.downstream_cx_total
. The tagenvoy.http_user_agent
will be added with tag valueios
.The second regex will remove
connection_manager_1.
from the tag extracted name produced by the first regexhttp.connection_manager_1.user_agent.downstream_cx_total
, leavinghttp.user_agent.downstream_cx_total
as the tag extracted name. The tagenvoy.http_conn_manager_prefix
will be added with the tag valueconnection_manager_1
.
StatsConfig¶
Statistics architecture overview.
{
"stats_tags": [],
"use_all_default_tags": "{...}"
}
- stats_tags
- (TagSpecifier) Each stat name is iteratively processed through these tag specifiers. When a tag is matched, the first capture group is removed from the name so later TagSpecifiers cannot match that same portion of the match.
- use_all_default_tags
(BoolValue) Use all default tag regexes specified in Envoy. These can be combined with custom tags specified in stats_tags. They will be processed before the custom tags.
Note
If any default tags are specified twice, the config will be considered invalid.
See well_known_names.h for a list of the default tags in Envoy.
If not provided, the value is assumed to be true.
Watchdog¶
Envoy process watchdog configuration. When configured, this monitors for nonresponsive threads and kills the process after the configured thresholds.
{
"miss_timeout": "{...}",
"megamiss_timeout": "{...}",
"kill_timeout": "{...}",
"multikill_timeout": "{...}"
}
- miss_timeout
- (Duration) The duration after which Envoy counts a nonresponsive thread in the server.watchdog_miss statistic. If not specified the default is 200ms.
- megamiss_timeout
- (Duration) The duration after which Envoy counts a nonresponsive thread in the server.watchdog_mega_miss statistic. If not specified the default is 1000ms.
- kill_timeout
- (Duration) If a watched thread has been nonresponsive for this duration, assume a programming error and kill the entire Envoy process. Set to 0 to disable kill behavior. If not specified the default is 0 (disabled).
- multikill_timeout
- (Duration) If at least two watched threads have been nonresponsive for at least this duration assume a true deadlock and kill the entire Envoy process. Set to 0 to disable this behavior. If not specified the default is 0 (disabled).
Runtime¶
Runtime configuration overview.
{
"symlink_root": "...",
"subdirectory": "...",
"override_subdirectory": "..."
}
- symlink_root
- (string, REQUIRED) The implementation assumes that the file system tree is accessed via a symbolic link. An atomic link swap is used when a new tree should be switched to. This parameter specifies the path to the symbolic link. Envoy will watch the location for changes and reload the file system tree when they happen.
- subdirectory
- (string) Specifies the subdirectory to load within the root directory. This is useful if multiple systems share the same delivery mechanism. Envoy configuration elements can be contained in a dedicated subdirectory.
- override_subdirectory
- (string) Specifies an optional subdirectory to load within the root directory. If specified and the directory exists, configuration values within this directory will override those found in the primary subdirectory. This is useful when Envoy is deployed across many different types of servers. Sometimes it is useful to have a per service cluster directory for runtime configuration. See below for exactly how the override directory is used.
RateLimitServiceConfig¶
[RateLimitServiceConfig proto]
Rate limit configuration overview.
{
"cluster_name": "..."
}
- cluster_name
- (string, REQUIRED) Specifies the cluster manager cluster name that hosts the rate limit service. The client will connect to this cluster when it needs to make rate limit service requests.