Created
October 24, 2013 10:30
-
-
Save vesse/7134801 to your computer and use it in GitHub Desktop.
Basic HAProxy setup for nodejs app
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 | |
daemon | |
maxconn 4096 | |
user haproxy | |
group haproxy | |
defaults | |
log global | |
frontend http-in | |
mode http | |
bind *:80 | |
timeout client 86400000 | |
default_backend node_backend | |
acl is_websocket hdr(Upgrade) -i WebSocket | |
acl is_websocket hdr_beg(Host) -i ws | |
backend node_backend | |
mode http | |
option forwardfor | |
timeout server 86400000 | |
timeout connect 5000 | |
server mynodeservice localhost:3120 weight 1 maxconn 1024 check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment