mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-10 07:28:06 -05:00
Reference: https://docs.docker.com/compose/ Related: https://github.com/socketio/socket.io/discussions/4669
32 lines
800 B
INI
32 lines
800 B
INI
# Reference: http://blog.haproxy.com/2012/11/07/websockets-load-balancing-with-haproxy/
|
|
|
|
global
|
|
daemon
|
|
maxconn 4096
|
|
nbproc 2
|
|
|
|
defaults
|
|
mode http
|
|
balance roundrobin
|
|
option http-server-close
|
|
timeout connect 5s
|
|
timeout client 30s
|
|
timeout client-fin 30s
|
|
timeout server 30s
|
|
timeout tunnel 1h
|
|
default-server inter 1s rise 2 fall 1 on-marked-down shutdown-sessions
|
|
option forwardfor
|
|
|
|
listen chat
|
|
bind *:80
|
|
default_backend nodes
|
|
|
|
backend nodes
|
|
option httpchk HEAD /health
|
|
http-check expect status 200
|
|
cookie serverid insert
|
|
server john server-john:3000 cookie john check
|
|
server paul server-paul:3000 cookie paul check
|
|
server george server-george:3000 cookie george check
|
|
server ringo server-ringo:3000 cookie ringo check
|