mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-30 01:19:35 +00:00
29 lines
867 B
Cheetah
29 lines
867 B
Cheetah
global
|
|
maxconn 100
|
|
|
|
defaults
|
|
log global
|
|
mode tcp
|
|
retries 2
|
|
timeout client 30m
|
|
timeout connect 4s
|
|
timeout server 30m
|
|
timeout check 5s
|
|
|
|
frontend master_postgresql
|
|
bind *:5000
|
|
default_backend backend_master
|
|
|
|
frontend replicas_postgresql
|
|
bind *:5001
|
|
default_backend backend_replicas
|
|
|
|
backend backend_master
|
|
option httpchk OPTIONS /master
|
|
{{range gets "/members/*"}} server {{base .Key}} {{$data := json .Value}}{{base (replace (index (split $data.conn_url "/") 2) "@" "/" -1)}} maxconn 100 check port {{index (split (index (split $data.api_url "/") 2) ":") 1}}
|
|
{{end}}
|
|
backend backend_replicas
|
|
option httpchk OPTIONS /replica
|
|
{{range gets "/members/*"}} server {{base .Key}} {{$data := json .Value}}{{base (replace (index (split $data.conn_url "/") 2) "@" "/" -1)}} maxconn 100 check port {{index (split (index (split $data.api_url "/") 2) ":") 1}}
|
|
{{end}}
|