Expose consul-template
configuration parameters for operators to tune.
#11707
Labels
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
theme/template
type/enhancement
Use-cases
When Nomad clusters are experiencing Consul/Vault system degradation, or in situations where Operators have a higher tolerance for latency or connectivity loss (edge), a lack of control over
consul-template
fault tolerance behaviors can lead to a significant amount of allocation churn.consul-template
exposes configuration options for fine-tuning retries, blocking queries, and startup fault tolerance. Having the ability to configure these options would be useful for Nomad Operators, especially when experiencing latency or instability when communicating with Consul.Proposal
Expose
consul-template
configuration parameters for operators to tune. The set of configuration options that will be exposed forconsul-template
, and their usage are:max_stale
- This is the maximum interval to allow "stale" data. By default, only the Consul leader will respond to queries. Requests to a follower or local agent will be forwarded to the leader. In large clusters with many requests, this is not as scalable, so this option allows any follower to respond to a query, so long as the last-replicated data is within these bounds. Higher values result in less cluster load but are more likely to have outdated data.block_query_wait
- This is the amount of time to perform a blocking query. Many endpoints in Consul support a feature known as "blocking queries". A blocking query is used to wait for a potential change using long polling. This reduces the load on Consul by avoiding making new requests to Consul when nothing has changed.wait
- This defines the minimum and maximum amount of time to wait for the cluster to reach a consistent state before rendering a template. This is useful to enable in systems that are experiencing a lot of flapping because it will reduce the number of times a template is rendered. This is configurable at both the client and the task level. The task-level setting can be used to override the global setting.wait_bounds
- This is a Nomad-specific configuration that enables Nomad Operators to set client level constraints that set bounds on individualjobspec
configuration. This setting defines lower and upper bounds for per-templatewait
configuration on a given client. If the individual template configuration has amin
lower thanwait_bounds.min
or amax
greater than thewait_bounds.max
, the bounds will be enforced, and the templatewait
will be adjusted before being sent toconsul-template
.consul_retry
- This controls the retry behavior when an error is returned from Consul. By default, Nomad will fail and reschedule an alloc when a template fails to render. This can lead to a significanteval
->alloc
->template
render failure cycle in clusters where Consul is unstable.Related Issues
Closes #3866
Closes #2623
The text was updated successfully, but these errors were encountered: