Created
January 22, 2014 20:58
-
-
Save sintaxi/8567225 to your computer and use it in GitHub Desktop.
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 | |
maxconn 4096 | |
pidfile /Users/sintaxi/Documents/Node/Modules/pids/haproxy.pid | |
defaults | |
mode http | |
retries 3 | |
option redispatch | |
option httpclose | |
maxconn 2000 | |
contimeout 5000 | |
clitimeout 50000 | |
srvtimeout 50000 | |
frontend HARP | |
bind *:80 | |
# acl is_naked hdr_reg(host) -i /.+\.\w+\.\w+/ | |
acl is_api hdr_beg(host) -i lvh.me | |
acl is_api method PUT | |
acl is_api method POST | |
use_backend API if is_api | |
default_backend KNOBS | |
backend KNOBS | |
balance roundrobin | |
server KNOB0 127.0.0.1:8001 check | |
#server KNOB1 127.0.0.1:8002 check | |
backend API | |
balance roundrobin | |
server API0 127.0.0.1:5001 check | |
#server API1 127.0.0.1:5002 check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment