Skip to content

Instantly share code, notes, and snippets.

@igrigorik
Created July 30, 2010 04:23
Show Gist options
  • Save igrigorik/499897 to your computer and use it in GitHub Desktop.
Save igrigorik/499897 to your computer and use it in GitHub Desktop.
# sample tcp balancer to balance between two TCP brokers
global
log 127.0.0.1 local0 info
defaults
clitimeout 60000 # maximum inactivity time on the client side
srvtimeout 30000 # maximum inactivity time on the server side
timeout connect 8000 # maximum time to wait for a connection attempt to a server to succeed
# go to localhost:8080/admin to preview stats
listen stats 0.0.0.0:8081
mode http
stats auth admin:password
stats uri /monitor
stats refresh 5s
transparent
listen ws-proxy
log global
bind :8080
mode tcp
balance roundrobin
server websocket1 127.0.0.1:10000
server websocket2 127.0.0.1:10001
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment