LB configuration file /opt/polaris/etc/polaris-lb.yaml consists of two sections:
Example:
pools:
www-example:
monitor: http
monitor_params:
use_ssl: true
hostname: www.example.com
url_path: /healthcheck?check_all=true
lb_method: twrr
fallback: any
max_addrs_returned: 2
members:
- ip: 10.1.1.2
monitor_ip: 172.16.1.3
name: www1-dc1
weight: 1
- ip: 10.1.1.3
name: www2-dc1
weight: 1
- ip: 192.168.1.2
name: www3-dc2
weight: 1
- ip: 192.168.1.3
name: www4-dc2
weight: 1
globalnames:
www.example.com:
pool: www-example
ttl: 1
Parameters:
Parameters:
Common optional params:
Perform HTTP(S) GET, succeeds if response HTTP status is 200(or one of expected_codes is specified)
monitor_params:
false/.Host: header, when using SSL this will also be supplied in SNI, default is none.use_ssl set to false, port 443 will be used with use_ssl set to trueExample:
pools:
example1:
monitor: http
monitor_params:
use_ssl: true
hostname: www.example.com
url_path: /health.html
interval: 30
expected_codes:
- 201
- 203
Perform a TCP connect. (Optionally: send text, read response, match a reg exp pattern).
monitor_params:
Example:
pools:
example1:
monitor: tcp
monitor_params:
port: 2222
timeout: 0.1
match_re: up
Forces a member to be either UP or DOWN effectively disabling the health checking.
monitor_params:
Example:
pools:
example1:
monitor: forced
Parameters: