Created
June 26, 2015 11:44
-
-
Save rnewson/9f2963a858344390049b to your computer and use it in GitHub Desktop.
haproxy.cfg
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
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
# use this file except in compliance with the License. You may obtain a copy of | |
# the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
# License for the specific language governing permissions and limitations under | |
# the License. | |
global | |
maxconn 512 | |
spread-checks 5 | |
defaults | |
mode http | |
log global | |
monitor-uri /_haproxy_health_check | |
option log-health-checks | |
option httplog | |
balance roundrobin | |
option forwardfor | |
option redispatch | |
retries 4 | |
option http-server-close | |
timeout client 150000 | |
timeout server 3600000 | |
timeout connect 500 | |
stats enable | |
stats scope . | |
stats uri /_stats | |
frontend http-in | |
# This requires HAProxy 1.5.x | |
# bind *:$HAPROXY_PORT | |
bind *:5984 | |
acl ordered path_beg /_nodes | |
use_backend couchdbs-ordered if ordered | |
default_backend couchdbs | |
backend couchdbs | |
server couchdb1 127.0.0.1:15984 check inter 5s | |
server couchdb2 127.0.0.1:25984 check inter 5s | |
server couchdb3 127.0.0.1:35984 check inter 5s | |
backend couchdbs-ordered | |
balance first | |
server couchdb1 127.0.0.1:15984 check inter 5s | |
server couchdb2 127.0.0.1:25984 check inter 5s | |
server couchdb3 127.0.0.1:35984 check inter 5s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment