我对 haproxy 配置有一个大问题。我有网址:
http://domain.com/some-text/?9/3/90/custom/184/2256184/2.jpg<br>
目标是 Haproxy 应该始终在同一个网络服务器上发送具有相同 ID(例如 2256184)的 url。
我试过参数“balance uri depth 8”,但它不起作用。有人知道如何解决这个问题吗?
我的 haproxy 1.5 配置:
global
log /dev/log local0 debug
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
maxconn 5000
defaults
log global
mode http
option httplog
option forwardfor
option http-server-close
option dontlognull
timeout connect 5s
timeout client 25s
timeout server 25s
frontend http-frontend
bind 0.0.0.0:80
mode http
maxconn 50000
default_backend webfarm
backend webfarm
mode http
balance uri depth 8
option forwardfor
hash-type consistent
server webmember01 192.168.10.22:80 weight 50 check
server webmember02 192.168.10.23:80 weight 50 check