Hi,
   I am a Haproxy user.and had some problomes.
   
my load balancer policy is:
#haproxy.cfg
global
        daemon       
        maxconn 409600
        chroot /usr/local/haproxy 
        uid 99
        gid 99      
        #nbproc 4
        #debug
        #quiet
defaults

        balance  hdr(X-Up-Calling-Line-ID)
        hash-type consistent
#       hash-type  map-based
        mode    http
        #option  httplog
        #option  dontlognull
        option forwardfor
        retries 5
        #option httpclose
        option dontlognull
        option forwardfor
        no option redispatch
        
        maxconn 409600
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000
#frontend http-in
#j2me-server
#       bind *:80
listen  j2me-server 0.0.0.0:80
      #  cookie  SERVERID rewrite
      #  balance roundrobin
#       capture request header X-Up-Calling-Line-ID len  11
#       balance  hdr(hdr_sub(X-Up-Calling-Line-ID))
#       balance  source
        balance  hdr(X-Up-Calling-Line-ID)
        hash-type consistent
        stats uri /site-stats  
        stats realm Haproxy\ statistics 
        stats auth fetion:fetion
        no option redispatch
        cookie SERVERID insert indirect  
        option httpchk HEAD /test.htm HTTP/1.0
#       server  j2me89_1 192.168.147.10:80 check inter 2000 rise 2 fall 5
        server  j2me89_1 192.168.98.89:80 check inter 2000 rise 2 fall 5
        server  j2me90_2 192.168.98.90:80 check inter 2000 rise 2 fall 5
        server  j2me91_3 192.168.98.91:80 check inter 2000 weight 3 rise 2 fall 
5
        server  j2me92_4 192.168.98.92:80 check inter 2000 weight 3 rise 2 fall 
5
        server  j2me93_5 192.168.98.93:80 check inter 2000 weight 3 rise 2 fall 
5
        server  j2me94_6 192.168.98.94:80 check inter 2000 weight 3 rise 2 fall 
5
        server  j2me102_7 192.168.98.102:80 check inter 2000 weight 3 rise 2 
fall 5
        server  j2me103_8 192.168.98.103:80 check inter 2000 rise 2 fall 5
        server  j2me104_9 192.168.98.104:80 check inter 2000 rise 2 fall 5
        server  j2me105_10 192.168.98.105:80 check inter 2000 rise 2 fall 5


the hash type is:  balance  hdr(X-Up-Calling-Line-ID),"X-Up-Calling-Line-ID" is 
a http request header like :
GET /test.aspx HTTP/1.1
X-Up-Calling-Line-ID: 13888888888


but 200 balance is wrong with 200,000 requests(the X-Up-Calling-Line-ID is 
random).
this 200 X-Up-Calling-Line-ID load to the different realserver.
In principle,will load to the same realserver with the same header of 
X-Up-Calling-Line-ID(hash-type consistent too).
Is something wrong with my haproxy.cfg or other?
Hope reply,thx.
Best Regards!

overred

2010-08-04 



overred 

Reply via email to