acl url_mdw hdr_end(host) -i mondossierweb.univ.fr
acl acl_mdw src -i -f /etc/haproxy/acl/mdw
acl ws_mdw hdr(Upgrade) -i WebSocket use_backend ws_mdw if ws_mdw url_mdw acl_mdw tcp-request inspect-delay 500ms tcp-request content accept if HTTP
use_backend www_mdw if url_mdw acl_mdw ##### # Conf partie Backend ###### backend ws_mdw mode http option forwardfor option http-server-close option forceclose no option httpclose
# Cookie qui permet a chaque client de toujours utiliser le même backend cookie ULPWEBID insert nocache indirect # Algorythme de repartition de charge balance roundrobin acl hdr_connection_upgrade hdr(Connection) -i upgrade http-request deny if ! hdr_connection_upgrade # Liste des serveurs backend
server back-lb1-mdw serveur1.univ.fr:20040 maxconn 3000 weight 10 cookie back-lb1-mdw check server back-lb2-mdw serveur2.univ.fr:20040 maxconn 3000 weight 10 cookie back-lb2-mdw check server back-lb3-mdw serveur3.univ.fr:20040 maxconn 3000 weight 10 cookie back-lb3-mdw check server back-lb4-mdw serveur4.univ.fr:20040 maxconn 3000 weight 10 cookie back-lb4-mdw check |