Appearance
Server pools Since v0.2
A server pool is a named group of servers with a balancing method, a health check and TLS settings towards the servers. Applications refer to a pool by name, and several applications may share one. Change a shared pool once to change every application that uses it.
Before you begin
- Role: global
operatororadminto change pools. Viewers and scoped readers can read the pools their applications use. - The
host:portaddress of each server. IPv6 addresses use brackets:[::1]:8080.
Create a server pool
text
1. Open Traffic > Server pools, and select Create server pool.
2. Enter a unique pool name.
3. Enter one or more server addresses (host:port). Set Weight (1 to 100) and Server state
for each row.
4. Choose the balancing method and, optionally, the health check path and Host.
5. Select Preview changes, add a comment and select Apply.sh
waap pools add -pool shop -f servers.yaml -m "shop servers" health_check.path=/healthz health_check.host=shop.testyaml
# servers.yaml (waap pools add), or server_pools[] in the configuration
- {address: "10.0.0.5:8080", weight: 1, state: active}
- {address: "10.0.0.6:8080", weight: 3, state: active}Weights 1 and 3 give a quarter and three quarters of the requests under round_robin. Attach the pool to an application with waap apps add ... server_pool=shop or waap apps set -app shop server_pool=shop. After you create the pool, its settings page shows the connect timeout, every health-check threshold and the TLS settings, each with its default and Use default.
Change the servers
The server list in the file replaces all servers, so include every server you keep.
text
1. Open Traffic > Server pools, and select the pool.
2. In the server table, select Add server, or edit an address, weight or state.
Remove server removes a row from the draft.
3. Select Preview changes, add a comment and select Apply.sh
waap pools get -pool shop
waap pools set -pool shop -f servers.yaml -m "change weights"Drain a server for maintenance
Set the server's state to draining and apply. No new requests go to it and requests in flight can finish. Health checks continue.
yaml
- {address: "10.0.0.5:8080", weight: 1, state: draining}
- {address: "10.0.0.6:8080", weight: 3, state: active}All servers draining can return 503
Keep at least one server active. A pool where every server is draining can answer with 503. A pool with every server disabled is refused when you apply it.
Verify servers with TLS
text
1. Open Traffic > Server pools, select the pool, then open Server CA.
2. For servers given as IP addresses, set Server name under Pool settings first.
3. Upload or paste a PEM CA bundle, then select Preview changes and Apply.sh
waap pools set -pool shop -m "enable TLS" tls.enabled=true tls.server_name=backend.example.com
waap pools ca set -pool shop -f ca.pem -m "trust the internal CA"
waap pools ca remove -pool shop -m "use system roots"The preview performs full server validation. Applying stores the bundle with the configuration version and enables TLS for the whole pool. Removing the bundle restores the system roots. The bundle survives a pool rename; a merge keeps the destination's bundle. pools get shows certificate metadata and never a private key.
Rename, merge and remove a pool
sh
waap pools rename -pool shop -to storefront -m "rename"
waap pools merge -into storefront -from old-shop -dry-run
waap pools merge -into storefront -from old-shop -m "share servers"
waap pools remove -pool unused -m "remove unused pool"- Rename updates every application reference in the same version.
- Merge moves the source pools' applications to the destination and removes the sources. The destination keeps its servers, health check and TLS settings. The sources' servers and settings are discarded, so review the diff.
- Remove needs the exact name. A pool that an application uses is refused with HTTP 409 and the application names. Change those applications' pool first. In the console, a pool's page has the same operations.
Removing an application does not remove its pool.
Settings reference
Pool
| Setting | What it does | Default | Allowed values | Applies in |
|---|---|---|---|---|
Name (name) | Identifies the pool in applications. | none | lowercase letters, digits and dashes; 1 to 63 characters | all |
Balancing (balancing) | How requests spread over the servers. | round_robin | round_robin, least_request, random | all |
Connect timeout (connect_timeout) | How long to wait for a connection to a server. | 5s | 1ms to 1m | all |
Servers
| Setting | What it does | Default | Allowed values | Applies in |
|---|---|---|---|---|
Address (address) | Where the server listens. | none | host:port | all |
Weight (weight) | Relative share of requests. | 1 | 1 to 100 | all |
Server state (state) | Whether the server takes traffic. | active | active, draining, disabled | all |
disabled omits the server from Envoy. At least one server must not be disabled.
Health check
| Setting | What it does | Default | Allowed values | Applies in |
|---|---|---|---|---|
Health check path (health_check.path) | Path requested on each server; a 2xx answer is healthy. | none (no active check) | URL path | all |
Health check Host (health_check.host) | Host name sent with each check. | see below | host name | active check |
Interval (health_check.interval) | Time between checks of each server. | 5s | 1s to 5m | active check |
Timeout (health_check.timeout) | How long a check may take; keep it shorter than the interval. | 2s | 1ms to 5m | active check |
Healthy after (health_check.healthy_after) | Passed checks in a row before a server gets traffic again. | 2 | up to 10 | active check |
Unhealthy after (health_check.unhealthy_after) | Failed checks in a row before a server is taken out. | 3 | up to 10 | active check |
When you leave Health check Host empty, the Host is the pool's TLS server name. Else it is the first non-wildcard host name of the first application, in configuration order, that uses the pool (a wildcard host name is used with *. removed). An unused pool uses its first server's host. A shared pool sends the same Host to every server, so choose a path that works for that Host.
Server TLS
| Setting | What it does | Default | Allowed values | Applies in |
|---|---|---|---|---|
Connect with TLS (tls.enabled) | Use HTTPS towards the servers. Turning it off removes the settings below. | false | true, false | all |
Verify the server certificate (tls.verify) | Check each server's certificate against the CA bundle or the system roots. | true | true, false | TLS enabled |
Server name (tls.server_name) | Name sent in SNI and verified. Empty: the first server's DNS name. | none | host name | TLS enabled; required to verify IP servers |
Examples
A pool of two weighted servers with a health check, shared by two applications:
yaml
version: 2
server_pools:
- name: shop
balancing: least_request
connect_timeout: 5s
servers:
- {address: "10.0.0.5:8080", weight: 1, state: active}
- {address: "10.0.0.6:8080", weight: 3, state: active}
health_check: {path: /healthz, interval: 5s, timeout: 1s, healthy_after: 2, unhealthy_after: 3}
applications:
- {name: shop, hostnames: [shop.test], listeners: [web], server_pool: shop}
- {name: shop-admin, hostnames: [admin.shop.test], listeners: [web], server_pool: shop}Limits
| Limit | Value |
|---|---|
| Pools per configuration | 1,024 |
| Servers per pool | 256 |
| Weight | 1 to 100 |
| CA bundle file | 8 MiB |
Configuration format 2
New documents use version: 2 with a top-level server_pools list, and each application has one server_pool reference. Format 1, with an upstream block per application, stays readable for good: loading, config apply and the YAML editor upgrade it in memory to one pool per application, named after it. waap validate prints format 1 upgraded: N pools created. Do not mix upstream with server_pools in one document.
On startup, the active node writes one new version when the stored document is format 1. Its actor is system, its source is migration, and the audit entry is config.migrate. Envoy clusters change from app/NAME to pool/NAME: in-flight requests finish and health checks start afresh, so health can be unknown for the first few checks. The settings waap apps set upstream.*=... and waap apps ca are deprecated and edit only a pool that one application owns.
Troubleshooting
A pool cannot be removed. Cause: an application uses it (HTTP 409 names them). Check: waap pools list. Fix: move those applications to another pool, then remove it.
Requests return 503. Cause: every server is draining, unhealthy or disabled. Check: Server health. Fix: set a server to active, or fix the server.
TLS verification fails for IP servers. Cause: no server name to verify. Fix: set tls.server_name to the name in the servers' certificates.