Created
February 3, 2012 02:56
-
-
Save lucastorri/1727346 to your computer and use it in GitHub Desktop.
HAProxy config for Play 2.0 app with WebSocket support
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 # Total Max Connections. This is dependent on ulimit | |
nbproc 1 | |
defaults | |
mode http | |
frontend all 0.0.0.0:80 | |
timeout client 86400000 | |
default_backend play_server | |
acl is_websocket hdr(Upgrade) -i WebSocket | |
acl is_websocket hdr_beg(Host) -i ws | |
use_backend play_server if is_websocket | |
backend play_server | |
balance roundrobin | |
option forwardfor # This sets X-Forwarded-For | |
timeout queue 5000 | |
timeout server 86400000 | |
timeout connect 86400000 | |
server apiserver 127.0.0.1:9000 weight 1 maxconn 1024 check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment