haproxy multiple backend ports -


i have ha proxy configuration in backend 3 clusters of application servers. backend servers using port http->80, socket.io->3000, , redis->6379

so created following backend , frontend. first application added socket.io en redis. not second. not sure , if best way of doing it.

frontend http-in     bind *:80 name port80     mode http      # define hosts     acl host_appl3 hdr(host) -i im.test.com     acl host_appl4 hdr(host) -i appl4.test.com     acl websocket_appl3 hdr(upgrade) -i websocket      # figure out 1 use     use_backend appl3_cluster if host_appl3     use_backend appl4_cluster if host_appl4     use_backend appl3_websocket if appl3_websocket  frontend redis     bind *:6379 name port6379      #define hosts     acl redis_appl3 hdr(host) -i im.test.com      #figure out 1 use     use_backend appl3_redis if redis_appl3  backend appl3_cluster     mode http     balance leastconn     option httpclose     option forwardfor     cookie jsessionid prefix     # private address     server appl3node1_http 10.146.94.99:80 cookie check     # private address     # server appl3node2_http x.x.x.x cookie check  backend appl3_websocket     mode http     option forwardfor     reqadd x-forwarded-proto:\ http     server appl3node1_ws 10.146.94.99:3000 check     # server appl3node2_ws x.x.x.x:3000 check  backend appl3_redis     mode tcp     option tcplog     option tcp-check     tcp-check send ping\r\n     tcp-check expect +pong     tcp-check send info\ replication\r\n     tcp-check expect string role:master     tcp-check send quit\r\n     tcp-check expect string +ok     server appl3node1_redis 10.146.94.99:6379 check inter ls     #server appl3node2_redis x.x.x.x:6379 inter ls  backend appl4_cluster     balance leastconn     option httpclose     cookie jsessioid prefix     # private address     server node2_http 10.42.71.166:80 cookie check etc..... 

anyone me out?

jan


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -