Appearance
Server pools, VIPs, virtual servers and trusted proxies Since v0.2
These top-level keys define where clients connect and where traffic goes. listeners is the file name for virtual servers.
For the structure of the file, see Configuration file. Defaults of limits are also listed in Limits and defaults. A dash in Default means the code sets no default value (the setting is empty or off).
Server pools
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
server_pools[] | list of object | — | — | Group of settings: server pools. | Server pools |
server_pools[].name | string | — | — | The name that identifies this entry. | Server pools |
server_pools[].balancing | string | — | round_robin, least_request, random | Sets balancing. | Server pools |
server_pools[].servers[] | list of object | — | — | Group of settings: servers. | Server pools |
server_pools[].servers[].address | string | — | — | Network address, host:port or IP. | Server pools |
server_pools[].servers[].weight | integer | — | — | Weight of this signal in the score. | Server pools |
server_pools[].servers[].state | string | — | active, draining, disabled | Sets state. | Server pools |
server_pools[].health_check | object | — | — | Group of settings: health check. | Server pools |
server_pools[].health_check.host | string | — | — | Host name this entry applies to or connects to. | Server pools |
server_pools[].health_check.path | string | — | — | Request path. | Server pools |
server_pools[].health_check.interval | duration | 5s | — | Time between runs or checks. | Server pools |
server_pools[].health_check.timeout | duration | 2s | — | Time allowed before the operation is abandoned. | Server pools |
server_pools[].health_check.healthy_after | integer | 2 | — | Sets healthy after. | Server pools |
server_pools[].health_check.unhealthy_after | integer | 3 | — | Sets unhealthy after. | Server pools |
server_pools[].connect_timeout | duration | — | — | Sets connect timeout. | Server pools |
server_pools[].tls | object | — | — | Group of settings: tls. | Server pools |
server_pools[].tls.enabled | boolean | — | — | Turns the feature on or off. | Server pools |
server_pools[].tls.verify | boolean | true when enabled | — | default true when enabled | Server pools |
server_pools[].tls.ca | string | — | — | Path to the CA certificate used to verify the peer. | Server pools |
server_pools[].tls.server_name | string | — | — | TLS server name to present and verify. | Server pools |
VIPs
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
vips[] | list of object | — | — | Group of settings: vips. | VIPs |
vips[].name | string | — | — | The name that identifies this entry. | VIPs |
vips[].address | string | — | — | Network address, host:port or IP. | VIPs |
vips[].description | string | — | — | Free-text description. | VIPs |
vips[].floating | boolean | — | — | floating VIPs are moved between the nodes of a pair by failover; they must be one of ha.virtual_addresses. | VIPs |
Virtual servers (listeners)
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
listeners[] | list of object | — | — | Group of settings: listeners. | Virtual servers |
listeners[].name | string | — | — | The name that identifies this entry. | Virtual servers |
listeners[].address | string | — | — | Network address, host:port or IP. | Virtual servers |
listeners[].vip | string | — | — | Sets vip. | Virtual servers |
listeners[].port | integer | — | — | TCP port. | Virtual servers |
listeners[].protocol | string | — | http, https | Sets protocol. | Virtual servers |
listeners[].tls | object | — | — | Group of settings: tls. | Virtual servers |
listeners[].tls.min_version | string | 1.2 | 1.2, 1.3 | Sets min version. | Virtual servers |
Trusted proxies
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
trusted_proxies | list of string | — | IP or CIDR | Sets trusted proxies. | Client identity |
Example
yaml
version: 2
trusted_proxies: [10.0.0.0/8]
listeners:
- {name: web, address: "0.0.0.0:8080", protocol: http}
- {name: web-tls, address: "0.0.0.0:8443", protocol: https, tls: {min_version: "1.2"}}
server_pools:
- name: shop
balancing: round_robin
servers:
- {address: "127.0.0.1:9000", weight: 1, state: active}
health_check: {path: /healthz, interval: 5s, timeout: 2s}
applications:
- name: shop
hostnames: [shop.example.com]
listeners: [web]
server_pool: shop