我有一個haproxy配置的大問題。我的網址:haproxy餘額uri深度
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
感謝您的回答。我已經嘗試過參數平衡uri深度7和6.一旦我改變「some-text」下的文本,haproxy就會將url發送到另一臺服務器。它似乎haproxy忽略「平衡uri深度」
http://domain.com/some-text/9/3/90/custom/184/2256184/2.jpg – user3589380 2014-09-08 09:41:55
我減少問題是URL,因爲我網址是問號domain.com/some-text/?9/3/90/custom/184/2256184/2.jpg – user3589380 2014-09-11 09:14:38