mirror of
https://github.com/openziti/ziti.git
synced 2026-11-25 17:01:52 +00:00
942d1a72bc
- applies controller lists, leader announcements, controller address changes and index resets on one goroutine in arrival order, so checking an update's index, applying it and recording it is one step and no control channel's receive goroutine waits on another controller's update - lets only a leader's list at a newer index replace the controller set; any other list at or above the recorded version only adds, merging into the router's stored details and connected controllers - applies a leader's list at the recorded version as additions, so a router missing controllers recovers when the leader resends - keeps an inbound controller's socket address out of the saved endpoints, and fills in a saved controller that has no endpoints when a later list gives some - orders leadership claims by raft term: adds a raftTerm field to UpdateCtrlAddresses and UpdateClusterLeader, which controllers read together with leadership so both describe the same raft term; claims without one, from older controllers, still apply as they arrive - folds the cluster leader handler into the same worker - asks every connected controller for its list while waiting for the leader's, without waiting on a full send queue, one request run at a time, stopping when the router closes - bounds the waiting updates: past the bound it drops waiting lists and announcements, keeps each controller's latest address change, and requests the leader's list - fixes a router crash applying a controller's new address before any controller details were stored, and keeps connected controllers the router has no details for - stops clustered controllers sending the newListener address, which the cluster's controller lists would undo, warns when it is configured, and notes this in the sample configs - tests list handling, leadership ordering, overflow, the request loop, address changes and the controller's raft term read - notes the fix in the changelog
280 lines
12 KiB
YAML
280 lines
12 KiB
YAML
# Config Format Version
|
|
#
|
|
# Whenever a breaking change is made to the semantics of this configuration file, the configuration version
|
|
# expected by the controller will be incremented. When the controller tries to load a configuration file with
|
|
# an incompatible version, it will abort with a message prompting the operator to seek out the breaking changes
|
|
# documentation.
|
|
#
|
|
v: 3
|
|
|
|
# Identity
|
|
#
|
|
# Define all of the paths to the certificates and key required to establish the controller's identity.
|
|
#
|
|
identity:
|
|
cert: etc/ca/intermediate/certs/ctrl-client.cert.pem
|
|
server_cert: etc/ca/intermediate/certs/ctrl-server.cert.pem
|
|
key: etc/ca/intermediate/private/ctrl.key.pem
|
|
ca: etc/ca/intermediate/certs/ca-chain.cert.pem
|
|
|
|
trustDomain: usedForLegacyNonHaNetworksWithoutSpiffeIdsInCerts
|
|
|
|
cluster:
|
|
advertiseAddress: tcp:localhost:1380
|
|
bindAddress: tcp:0.0.0.0:1380
|
|
dataDir: /home/plorenz/work/var/data/
|
|
# preferredLeader - optional, default false
|
|
# If set to true, this controller will be preferred as the raft cluster leader. If the current leader is not a
|
|
# preferred leader, it will transfer leadership to a preferred leader if one is available.
|
|
#preferredLeader: true
|
|
# dialer:
|
|
# # minRetryInterval - optional, default 1s
|
|
# # The minimum time between peer dial retry attempts.
|
|
# minRetryInterval: 1s
|
|
# # maxRetryInterval - optional, default 1m
|
|
# # The maximum time between peer dial retry attempts.
|
|
# maxRetryInterval: 1m
|
|
# # retryBackoffFactor - optional, default 2.0
|
|
# # The multiplier applied to the retry interval after each failed dial attempt.
|
|
# retryBackoffFactor: 2.0
|
|
# # fastFailureWindow - optional, default 30s
|
|
# # After a successful connection, the dialer will re-check the peer after this duration. If the
|
|
# # connection was lost within this window, it applies backoff instead of resetting the retry delay.
|
|
# fastFailureWindow: 30s
|
|
# # dialTimeout - optional, default 10s
|
|
# # The maximum time a single peer dial attempt is allowed to run before being abandoned.
|
|
# dialTimeout: 10s
|
|
# # scanInterval - optional, default 30s
|
|
# # Period of the dialer's full scan that reconciles dial state against current membership.
|
|
# scanInterval: 30s
|
|
# # queueCheckInterval - optional, default 5s
|
|
# # How often the dialer pops expired entries from its retry heap. Effectively the
|
|
# # resolution at which MinRetryInterval is honored.
|
|
# queueCheckInterval: 5s
|
|
# # nonMemberGrace - optional, default 1m
|
|
# # How long the leader will allow a TLS-valid but non-member controller to stay connected
|
|
# # to the mesh before dropping it.
|
|
# nonMemberGrace: 1m
|
|
# rateLimiter:
|
|
# enabled: true
|
|
# minSize: 5
|
|
# maxSize: 250
|
|
# timeout: 30s
|
|
# successThreshold: 0.9
|
|
# increaseFactor: 1.02
|
|
# decreaseFactor: 0.9
|
|
# increaseCheckInterval: 10
|
|
# decreaseCheckInterval: 10
|
|
|
|
# Network Configuration
|
|
#
|
|
# Configure how the controller will establish and manage the overlay network, and routing operations on top of
|
|
# the network.
|
|
#
|
|
#network:
|
|
#
|
|
# routeTimeoutSeconds controls the number of seconds the controller will wait for a route attempt to succeed.
|
|
#
|
|
#routeTimeoutSeconds: 10
|
|
#
|
|
# createCircuitRetries controls the number of retries that will be attempted to create a path (and terminate it)
|
|
# for new circuits.
|
|
#
|
|
#createCircuitRetries: 3
|
|
#
|
|
# pendingLinkTimeoutSeconds controls how long we'll wait before creating a new link between routers where
|
|
# there isn't an established link, but a link request has been sent
|
|
#
|
|
#pendingLinkTimeoutSeconds: 10
|
|
#
|
|
#
|
|
# Defines the period that the controller re-evaluates the performance of all of the circuits
|
|
# running on the network.
|
|
#
|
|
cycleSeconds: 15
|
|
|
|
# Sets router minimum cost. Defaults to 10
|
|
minRouterCost: 10
|
|
|
|
# Sets how often a new control channel connection can take over for a router with an existing control channel connection
|
|
# Defaults to 1 minute
|
|
routerConnectChurnLimit: 1m
|
|
|
|
#smart:
|
|
#
|
|
# Defines the fractional upper limit of underperforming circuits that are candidates to be re-routed. If
|
|
# smart routing detects 100 circuits that are underperforming, and `smart.rerouteFraction` is set to `0.02`,
|
|
# then the upper limit of circuits that will be re-routed in this `cycleSeconds` period will be limited to
|
|
# 2 (2% of 100).
|
|
#
|
|
#rerouteFraction: 0.02
|
|
#
|
|
# Defines the hard upper limit of underperforming circuits that are candidates to be re-routed. If smart
|
|
# routing detects 100 circuits that are underperforming, and `smart.rerouteCap` is set to `1`, and
|
|
# `smart.rerouteFraction` is set to `0.02`, then the upper limit of circuits that will be re-routed in this
|
|
# `cycleSeconds` period will be limited to 1.
|
|
#
|
|
#rerouteCap: 4
|
|
|
|
# Database Location
|
|
#
|
|
# Define the path to where the controller's database will be stored.
|
|
#
|
|
db: /tmp/devctrl.db
|
|
#dbTrace: true
|
|
|
|
# Overlay Tracing
|
|
#
|
|
# Record message traces of all messages captured on any channel (`ctrl` or `mgmt`) in "dump" format to the
|
|
# specified path. The `ziti-fabric trace dump` utility will convert this binary dump file into a human-readable
|
|
# explanation of the messages that were sent and received by the controller.
|
|
#
|
|
#trace:
|
|
# path: ctrl.trace
|
|
|
|
# Profiling
|
|
#
|
|
# Enable and configure memory and CPU profiling for the controller. See `go tool pprof` for information on how
|
|
# to work with this profile data.
|
|
#
|
|
#profile:
|
|
#memory:
|
|
#path: ctrl.memprof
|
|
#
|
|
# Defines the interval at which memory profiling snapshots will be recorded.
|
|
#
|
|
#intervalMs: 15
|
|
#cpu:
|
|
#path: ctrl.cpuprof
|
|
|
|
# TLS Configuration
|
|
#
|
|
# Configure TLS handshake settings for incoming connections.
|
|
#
|
|
#tls:
|
|
# handshakeTimeout: 10s
|
|
# rateLimiter:
|
|
# enabled: true
|
|
# minSize: 5
|
|
# maxSize: 250
|
|
# timeout: 30s
|
|
# successThreshold: 0.9
|
|
# increaseFactor: 1.02
|
|
# decreaseFactor: 0.9
|
|
# increaseCheckInterval: 10
|
|
# decreaseCheckInterval: 10
|
|
|
|
# Control Channel Configuration
|
|
#
|
|
# Define the listener for the control (`ctrl`) channel.
|
|
#
|
|
ctrl:
|
|
listener: tls:127.0.0.1:6262
|
|
#options:
|
|
# (optional) settings
|
|
# set the maximum number of connect requests that are buffered and waiting to be acknowledged (1 to 5000, default 1000)
|
|
#maxQueuedConnects: 50
|
|
# the maximum number of connects that have begun hello synchronization (1 to 1000, default 16)
|
|
#maxOutstandingConnects: 100
|
|
# the number of milliseconds to wait before a hello synchronization fails and closes the connection (30ms to 60000ms, default: 1000ms)
|
|
#connectTimeoutMs: 3000
|
|
# Sets the control channel write timeout. A write timeout will close the control channel, so the router will reconnect
|
|
#writeTimeout: 15s
|
|
# A listener address which will be sent to connecting routers in order to change their configured controller
|
|
# address. If defined, routers will update address configuration to immediately use the new address for future
|
|
# connections. The value of newListener must be resolvable both via DNS and validate via certificates
|
|
# Ignored by a clustered controller, which sends routers its cluster members' addresses; change
|
|
# advertiseAddress instead.
|
|
#newListener: tls:localhost:6262
|
|
|
|
# Management Channel Configuration
|
|
#
|
|
# Define the listener for the management (`mgmt`) channel.
|
|
#
|
|
mgmt:
|
|
listener: tls:127.0.0.1:10000
|
|
#options:
|
|
# (optional) settings
|
|
# set the maximum number of connect requests that are buffered and waiting to be acknowledged (1 to 5000, default 1000)
|
|
#maxQueuedConnects: 50
|
|
# the maximum number of connects that have begun hello synchronization (1 to 1000, default 16)
|
|
#maxOutstandingConnects: 100
|
|
# the number of milliseconds to wait before a hello synchronization fails and closes the connection (30ms to 60000ms, default: 1000ms)
|
|
#connectTimeoutMs: 3000
|
|
|
|
# Metrics Configuration
|
|
#
|
|
# Configure any additional handlers for metrics data in the controller. In the current configuration, there is only
|
|
# an `influxdb` handler, which will store metrics data as InfluxDB series.
|
|
#
|
|
# See `github.com/openziti/fabric/metrics` for more information on extending the controller with additional
|
|
# metrics handlers.
|
|
#
|
|
#metrics:
|
|
#influxdb:
|
|
#url: http://localhost:8086
|
|
#database: ziti
|
|
#
|
|
|
|
|
|
# web - optional
|
|
# Defines webListeners that will be hosted by the controller. Each webListener can host many APIs and be bound to many
|
|
# bind points.
|
|
web:
|
|
# name - required
|
|
# Provides a name for this listener, used for logging output. Not required to be unique, but is highly suggested.
|
|
- name: all-apis-localhost
|
|
# bindPoints - required
|
|
# One or more bind points are required. A bind point specifies an interface (interface:port string) that defines
|
|
# where on the host machine the webListener will listen and the address (host:port) that should be used to
|
|
# publicly address the webListener(i.e. mydomain.com, localhost, 127.0.0.1). This public address may be used for
|
|
# incoming address resolution as well as used in responses in the API.
|
|
bindPoints:
|
|
#interface - required
|
|
# A host:port string on which network interface to listen on. 0.0.0.0 will listen on all interfaces
|
|
- interface: 127.0.0.1:1280
|
|
# address - required
|
|
# The public address that external incoming requests will be able to resolve. Used in request processing and
|
|
# response content that requires full host:port/path addresses.
|
|
address: 127.0.0.1:1280
|
|
# identity - optional
|
|
# Allows the webListener to have a specific identity instead of defaulting to the root `identity` section.
|
|
# identity:
|
|
# cert: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ctrl-client.cert.pem
|
|
# server_cert: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ctrl-server.cert.pem
|
|
# key: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/private/ctrl.key.pem
|
|
# ca: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ca-chain.cert.pem
|
|
# options - optional
|
|
# Allows the specification of webListener level options - mainly dealing with HTTP/TLS settings. These options are
|
|
# used for all http servers started by the current webListener.
|
|
options:
|
|
# idleTimeout - optional, default 5000ms
|
|
# The maximum amount of idle time in milliseconds allowed for pipelined HTTP requests. Setting this too high
|
|
# can cause resources on the host to be consumed as clients remain connected and idle. Lowering this value
|
|
# will cause clients to reconnect on subsequent HTTPs requests.
|
|
idleTimeout: 5000ms #http timeouts, new
|
|
# readTimeout - optional, default 5000ms
|
|
# The maximum amount of time in milliseconds http servers will wait to read the first incoming requests. A higher
|
|
# value risks consuming resources on the host with clients that are acting bad faith or suffering from high latency
|
|
# or packet loss. A lower value can risk losing connections to high latency/packet loss clients.
|
|
readTimeout: 5000ms
|
|
# writeTimeout - optional, default 10000ms
|
|
# The total maximum time in milliseconds that the http server will wait for a single requests to be received and
|
|
# responded too. A higher value can allow long running requests to consume resources on the host. A lower value
|
|
# can risk ending requests before the server has a chance to respond.
|
|
writeTimeout: 100000ms
|
|
# minTLSVersion - optional, default TSL1.2
|
|
# The minimum version of TSL to support
|
|
minTLSVersion: TLS1.2
|
|
# maxTLSVersion - optional, default TSL1.3
|
|
# The maximum version of TSL to support
|
|
maxTLSVersion: TLS1.3
|
|
# apis - required
|
|
# Allows one or more APIs to be bound to this webListener
|
|
apis:
|
|
# binding - required
|
|
# Specifies an API to bind to this webListener. Built-in APIs are
|
|
# - health-checks
|
|
- binding: health-checks
|
|
- binding: fabric
|