Last active
December 18, 2018 22:15
-
-
Save fvanderbiest/bb703531dc085427eed5 to your computer and use it in GitHub Desktop.
HAProxy config for geoserver load balancing, with a master instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
chroot /var/lib/haproxy | |
daemon | |
group haproxy | |
maxconn 2000 | |
user haproxy | |
defaults | |
mode http | |
option redispatch | |
retries 3 | |
option httpclose | |
timeout connect 5000 | |
timeout client 10000 | |
timeout server 10000 | |
frontend geoservers | |
bind localhost:8189 | |
acl is_config path_beg /geoserver/web /geoserver/rest /geoserver/j_spring_security_check | |
default_backend slaves | |
use_backend master if is_config | |
timeout client 1m | |
backend slaves | |
balance roundrobin | |
timeout server 1m | |
timeout connect 10s | |
option forwardfor | |
option http-server-close | |
server geoserver1 127.0.0.1:8191 maxconn 1000 check port 8191 | |
server geoserver2 127.0.0.1:8192 maxconn 1000 check port 8192 | |
backend master | |
option forwardfor | |
option http-server-close | |
server geoserver0 127.0.0.1:8190 check port 8190 | |
listen admin | |
bind *:8888 | |
mode http | |
stats enable | |
stats uri /haproxy?stats |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment