0
RabbitMQ로드 밸런싱뿐만 아니라 websocket로드 밸런싱을 허용하는 haproxy (HAProxy 버전 1.5.18) 구성을 찾고 있습니다.Haproxy Sockjs Websocket로드 밸런싱 및 RabbitMQ로드 밸런싱 동일 구성
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 15s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
timeout tunnel 3600s
frontend http_web *:80
mode http
default_backend rgw
backend rgw
balance roundrobin
server rgw1 173.36.22.49:8080 maxconn 10000 weight 10 cookie rgw1 check
server rgw2 10.42.139.69:8080 maxconn 10000 weight 10 cookie rgw2 check
listen stats :9000
mode http
stats enable
stats realm Haproxy\ Statistics
stats uri /haproxy_stats # Stats URI
stats auth websocketadmin:websocketadmin
listen ampq
bind *:61613
mode tcp
option clitcpka
server rabbit1 10.42.6.112:61613 check inter 1s rise 3 fall 1
server rabbit2 10.42.6.113:61613 check inter 1s rise 3 fall 1
server rabbit3 10.42.6.114:61613 check inter 1s rise 3 fall 1
server rabbit4 10.42.6.115:61613 check inter 1s rise 3 fall 1
Haproxy이 오류를 제공하지 않습니다
, 그것은 아래의 메시지를 출력하지만, 작동하지 않는, 내가 연결할 수 없습니다 : 나는 많은 옵션을 시도했지만 아무도 제대로 작동하지, 아래에있는 내 haproxy 설정 파일입니다 websocket 또는 Rabbitmq에 연결하십시오. 그러나 "listen ampq"를 제거하면 모든 것이 올바르게 작동하기 시작합니다.
Sep 8 21:00:40 localhost haproxy[3184]: Proxy http_web started.
Sep 8 21:00:40 localhost haproxy[3184]: Proxy rgw started.
Sep 8 21:00:40 localhost haproxy[3184]: Proxy stats started.