On Mon, Mar 16, 2015 at 10:44 AM, Fraj KALLEL <frajkal...@gmail.com> wrote:
> Hello,
>
> I use haproxy v1.4 as load balancer in front of 2 web servers (webA and
> webB).
> webA has more resource (RAM, CPU, HDD) than webB, and I used roundrobin as
> algorithm of balance.
>
> This is the config file of the haproxy.
>
> global
>         log 127.0.0.1   local0
>         log 127.0.0.1   local1 notice
>         #log loghost    local0 info
>         maxconn 4096
>         #debug
>         #quiet
>         user haproxy
>         group haproxy
>
> defaults
>         log     global
>         mode    http
>         option  httplog
>         option  dontlognull
>         retries 3
>         option  redispatch
>         maxconn 2000
>         timeout connect      5000ms
>         timeout queue        5000ms
>         timeout client       25m
>         timeout server       25m
>
> listen webfarm 192.168.1.28:80
>        mode http
>        stats enable
>        stats auth stelb:abcder
>        balance roundrobin
>        appsession PHPSESSID len 64 timeout 3h request-learn prefix
>        option httpclose
>        option forwardfor
>        option httpchk HEAD /check.txt HTTP/1.0
>
>        acl white_list src 127.0.0.1 192.168.1.0/24
>        http-request allow if white_list
>        http-request deny
>
>        acl restricted_page path_beg /images
>
>        server webA 192.168.1.23:80 cookie A check
>        server webB 192.168.1.24:80 cookie B check
>
>
> After periode of utilization I find that webA receive more traffic than webB
> while by definition roundrobin algorithm assign to each process in equal
> portions and in circular order, handling all processes without priority
> (also known as cyclic executive).
>
> Is this a normal compotement ?
>
> Thanks.
>
> Sincerly yours,
> Fraj KALLEL


Hi Fraj,

This is normal and this is due to persistence.
More information on this blog post:
http://blog.haproxy.com/2012/03/29/load-balancing-affinity-persistence-sticky-sessions-what-you-need-to-know/

There is no rule, either A or B could get more requests.

Baptiste

Reply via email to