← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1599781] Re: [stable/liberty] LBaaS v2 haproxy: ROUND_ROBIN algorithm doesnt seems to work as expected

 

Thanks Brandon for looking into it..I did couple of experiment to confirm if algorithm works fine.
Suspect it was "nc" issue when I reported issue at first. Marking bug as Invalid..

I moved away from "nc" and deployed web servers using "nginx". Tried
below experiments and seems to be working as expected.

1. 4 members in POOL with Round_ROBIN algorithm.Sent n number of
requests and LB seems to load balance in round robin fashion.

root@controller:~# for i in {1..80} ; do curl 20.0.0.48 ; done
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
root@controller:~# 

2. Tested same thing with FIP attached to VIP and seems to work just
fine.

root@runner:~# for i in {1..40} ; do curl 192.168.0.7 ; done
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
20.0.0.47
20.0.0.46
20.0.0.45
20.0.0.44
root@runner:~# 


** Changed in: neutron
       Status: Incomplete => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1599781

Title:
  [stable/liberty] LBaaS v2 haproxy: ROUND_ROBIN algorithm doesnt seems
  to work as expected

Status in neutron:
  Invalid

Bug description:
  I am trying to test ROUND_ROBIN algorithm with lbaasv2 haproxy on stable/liberty. 
  With 4 members(web servers) in pool, I see there is some problem while scheduling in round robin fashion.

  Webserver is running on CirrOS VM using unix utility "netcat".

  MYIP=$(ifconfig eth0|grep 'inet addr'|awk -F: '{print $2}'| awk '{print $1}')
  while true; do echo -e "HTTP/1.0 200 OK\r\n\r\nWelcome to $MYIP" | sudo nc -l -p 80 ; done&

  setup details:
  1 controller
  50 KVM hosts
  50 ESX hosts

  
  root@controller:~# for i in {1..4} ; do curl  20.0.0.33 ; done
  Welcome to 20.0.0.29
  Welcome to 20.0.0.28
  Welcome to 20.0.0.9
  Welcome to 20.0.0.8
  root@controller:~# for i in {1..8} ; do curl  20.0.0.33 ; done
  Welcome to 20.0.0.29
  Welcome to 20.0.0.28
  Welcome to 20.0.0.9
  Welcome to 20.0.0.8
  Welcome to 20.0.0.29
  Welcome to 20.0.0.28
  Welcome to 20.0.0.9
  Welcome to 20.0.0.29
  root@controller:~#
  root@controller:~# for i in {1..8} ; do curl 20.0.0.33 ; done
  Welcome to 20.0.0.28
  Welcome to 20.0.0.9
  Welcome to 20.0.0.8
  Welcome to 20.0.0.29
  Welcome to 20.0.0.28
  Welcome to 20.0.0.9
  Welcome to 20.0.0.29
  Welcome to 20.0.0.28
  root@controller:~# 

  
  root@runner:~# neutron lbaas-pool-show 4f58e7c7-a079-4551-96b1-f0ed2e564392
  +---------------------+------------------------------------------------+
  | Field               | Value                                          |
  +---------------------+------------------------------------------------+
  | admin_state_up      | True                                           |
  | description         |                                                |
  | healthmonitor_id    |                                                |
  | id                  | 4f58e7c7-a079-4551-96b1-f0ed2e564392           |
  | lb_algorithm        | ROUND_ROBIN                                    |
  | listeners           | {"id": "cd840c0d-18f6-4621-a658-562067d0fa10"} |
  | members             | 23badd49-db2e-47f0-ad72-4bf3569bb697           |
  |                     | 59cdf1a7-e502-4b52-8a86-66fa08f8b6e7           |
  |                     | bdb7824b-5a66-4915-9756-25eaa27a01a8           |
  |                     | ecc641f5-d86e-498c-9c45-4eb137c4ddc7           |
  | name                | test-lb-pool-http                              |
  | protocol            | HTTP                                           |
  | session_persistence |                                                |
  | tenant_id           | ce1d087209c64df4b7e8007dc35def22               |
  +---------------------+------------------------------------------------+
  root@runner:~#

  root@runner:~# neutron lbaas-member-list 4f58e7c7-a079-4551-96b1-f0ed2e564392 
  +--------------------------------------+-----------+---------------+--------+--------------------------------------+----------------+
  | id                                   | address   | protocol_port | weight | subnet_id                            | admin_state_up |
  +--------------------------------------+-----------+---------------+--------+--------------------------------------+----------------+
  | 23badd49-db2e-47f0-ad72-4bf3569bb697 | 20.0.0.29 |            80 |      1 | 63cbeccd-6887-4dda-b4d2-b7503bce870a | True           |
  | 59cdf1a7-e502-4b52-8a86-66fa08f8b6e7 | 20.0.0.28 |            80 |      1 | 63cbeccd-6887-4dda-b4d2-b7503bce870a | True           |
  | bdb7824b-5a66-4915-9756-25eaa27a01a8 | 20.0.0.9  |            80 |      1 | 63cbeccd-6887-4dda-b4d2-b7503bce870a | True           |
  | ecc641f5-d86e-498c-9c45-4eb137c4ddc7 | 20.0.0.8  |            80 |      1 | 63cbeccd-6887-4dda-b4d2-b7503bce870a | True           |
  +--------------------------------------+-----------+---------------+--------+--------------------------------------+----------------+
  root@runner:~#   

  
  tcpdump on LBaaS v2 port for http traffic:

  root@controller:~# sudo ip netns exec qlbaas-79fae9be-7d0b-462b-bc3c-afb3e46c1613 tcpdump -B 25096 -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
  tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  listening on ns-59dda029-78, link-type EN10MB (Ethernet), capture size 65535 bytes
  09:22:13.209622 IP 20.0.0.2.52188 > 20.0.0.33.http: Flags [P.], seq 2868154750:2868154823, ack 3872811792, win 229, options [nop,nop,TS val 188976129 ecr 188976129], length 73
  E..}..@.@..........!...P...~..k......~.....
  .C...C..GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*

  
  09:22:13.211104 IP 20.0.0.33.33783 > 20.0.0.28.http: Flags [P.], seq 4010926729:4010926829, ack 108303536, win 229, options [nop,nop,TS val 188976129 ecr 91267], length 100
  E...n.@.@......!.......P.....t......(......
  .C....d.GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*
  X-Forwarded-For: 20.0.0.2

  
  09:22:13.212138 IP 20.0.0.28.http > 20.0.0.33.33783: Flags [P.], seq 1:41, ack 0, win 3620, options [nop,nop,TS val 91267 ecr 188976129], length 40
  E..\.3@.@.",.......!.P...t.........$(......
  ..d..C..HTTP/1.0 200 OK

  Welcome to 20.0.0.28

  09:22:13.212220 IP 20.0.0.33.http > 20.0.0.2.52188: Flags [P.], seq 1:41, ack 73, win 227, options [nop,nop,TS val 188976129 ecr 188976129], length 40
  E..\..@.@.+h...!.....P....k.........(q.....
  .C...C..HTTP/1.0 200 OK

  Welcome to 20.0.0.28

  09:22:13.219949 IP 20.0.0.2.52190 > 20.0.0.33.http: Flags [P.], seq 4133659441:4133659514, ack 3982402827, win 229, options [nop,nop,TS val 188976131 ecr 188976131], length 73
  E..}/5@.@..#.......!...P.b.1.^......(......
  .C...C..GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*

  
  09:22:13.227880 IP 20.0.0.33.39959 > 20.0.0.9.http: Flags [P.], seq 84504547:84504647, ack 435808612, win 229, options [nop,nop,TS val 188976133 ecr 23304383], length 100
  E.....@.@..S...!...	...P.	o....d....(......
  .C...c..GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*
  X-Forwarded-For: 20.0.0.2

  
  09:22:13.237364 IP 20.0.0.9.http > 20.0.0.33.39959: Flags [P.], seq 1:40, ack 100, win 3620, options [nop,nop,TS val 23304386 ecr 188976133], length 39
  E..[q.@.@......	...!.P.....d.	pG...$(w.....
  .c...C..HTTP/1.0 200 OK

  Welcome to 20.0.0.9

  09:22:13.237408 IP 20.0.0.33.http > 20.0.0.2.52190: Flags [P.], seq 1:40, ack 73, win 227, options [nop,nop,TS val 188976136 ecr 188976131], length 39
  E..[).@.@..r...!.....P...^...b.z....(p.....
  .C...C..HTTP/1.0 200 OK

  Welcome to 20.0.0.9

  09:22:13.270062 IP 20.0.0.2.52192 > 20.0.0.33.http: Flags [P.], seq 3272086917:3272086990, ack 3623649623, win 229, options [nop,nop,TS val 188976144 ecr 188976144], length 73
  E..}..@.@.x........!...P.......W....(......
  .C...C..GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*

  
  09:22:13.284589 IP 20.0.0.33.37883 > 20.0.0.8.http: Flags [P.], seq 2068359609:2068359709, ack 3293483869, win 229, options [nop,nop,TS val 188976147 ecr 90565], length 100
  E...%.@.@......!.......P{H...N.]....(......
  .C....a.GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*
  X-Forwarded-For: 20.0.0.2

  
  09:22:13.312196 IP 20.0.0.8.http > 20.0.0.33.37883: Flags [P.], seq 1:40, ack 100, win 3620, options [nop,nop,TS val 90574 ecr 188976147], length 39
  E..[..@.@..........!.P...N.]{H.....$(v.....
  ..a..C..HTTP/1.0 200 OK

  Welcome to 20.0.0.8

  09:22:13.312260 IP 20.0.0.33.http > 20.0.0.2.52192: Flags [P.], seq 1:40, ack 73, win 227, options [nop,nop,TS val 188976154 ecr 188976144], length 39
  H@.@..3...!.....P.....W........(p.....
  .C...C..HTTP/1.0 200 OK

  Welcome to 20.0.0.8

  09:22:13.366021 IP 20.0.0.2.52194 > 20.0.0.33.http: Flags [P.], seq 2661575587:2661575660, ack 2404931143, win 229, options [nop,nop,TS val 188976168 ecr 188976168], length 73
  E..}..@.@.*........!...P..k..XVG....(......
  .C.(.C.(GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*

  
  09:22:13.367772 IP 20.0.0.33.48437 > 20.0.0.29.http: Flags [P.], seq 1010430461:1010430561, ack 3762403146, win 229, options [nop,nop,TS val 188976168 ecr 20738120], length 100
  E...}.@.@..L...!.....5.P<9...A.J....(......
  .C.(.<pHGET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*
  X-Forwarded-For: 20.0.0.2

  
  09:22:13.369070 IP 20.0.0.29.http > 20.0.0.33.48437: Flags [P.], seq 1:41, ack 100, win 3620, options [nop,nop,TS val 20738121 ecr 188976168], length 40
  E..\..@.@.KZ.......!.P.5.A.J<9.a...$(......
  .<pI.C.(HTTP/1.0 200 OK

  Welcome to 20.0.0.29

  09:22:13.369101 IP 20.0.0.33.http > 20.0.0.2.52194: Flags [P.], seq 1:41, ack 73, win 227, options [nop,nop,TS val 188976169 ecr 188976168], length 40
  E..\.o@.@.8
  ...!.....P...XVG..k.....(q.....
  .C.).C.(HTTP/1.0 200 OK

  Welcome to 20.0.0.29

  09:22:13.376210 IP 20.0.0.2.52196 > 20.0.0.33.http: Flags [P.], seq 2610090558:2610090631, ack 4130193754, win 229, options [nop,nop,TS val 188976170 ecr 188976170], length 73
  E..}^.@.@..?.......!...P...>.-.Z....(......
  .C.*.C.*GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*

  
  09:22:13.377207 IP 20.0.0.33.33791 > 20.0.0.28.http: Flags [P.], seq 3012192692:3012192792, ack 3179475404, win 229, options [nop,nop,TS val 188976171 ecr 91308], length 100
  E.....@.@.,....!.......P..i.........(......
  .C.+..d.GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*
  X-Forwarded-For: 20.0.0.2

  
  09:22:13.378353 IP 20.0.0.28.http > 20.0.0.33.33791: Flags [P.], seq 1:41, ack 100, win 3620, options [nop,nop,TS val 91309 ecr 188976171], length 40
  E..\.b@.@.|........!.P........j....$(......
  ..d..C.+HTTP/1.0 200 OK

  Welcome to 20.0.0.28

  09:22:13.378387 IP 20.0.0.33.http > 20.0.0.2.52196: Flags [P.], seq 1:41, ack 73, win 227, options [nop,nop,TS val 188976171 ecr 188976170], length 40
  E..\Mp@.@..	...!.....P...-.Z........(q.....
  .C.+.C.*HTTP/1.0 200 OK

  Welcome to 20.0.0.28

  09:22:13.385287 IP 20.0.0.2.52198 > 20.0.0.33.http: Flags [P.], seq 1325632856:1325632929, ack 1972653513, win 229, options [nop,nop,TS val 188976173 ecr 188976173], length 73
  E..}.|@.@..........!...PO..Xu.M.....(......
  .C.-.C.-GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*

  
  09:22:13.386998 IP 20.0.0.33.39967 > 20.0.0.9.http: Flags [P.], seq 4247397792:4247397892, ack 2758048589, win 229, options [nop,nop,TS val 188976173 ecr 23304424], length 100
  E.....@.@.h....!...	...P.*%..d{M....(......
  .C.-.c..GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*
  X-Forwarded-For: 20.0.0.2

  
  09:22:13.388185 IP 20.0.0.9.http > 20.0.0.33.39967: Flags [P.], seq 1:40, ack 100, win 3620, options [nop,nop,TS val 23304424 ecr 188976173], length 39
  E..[..@.@......	...!.P...d{M.*&....$(w.....
  .c...C.-HTTP/1.0 200 OK

  Welcome to 20.0.0.9

  09:22:13.388229 IP 20.0.0.33.http > 20.0.0.2.52198: Flags [P.], seq 1:40, ack 73, win 227, options [nop,nop,TS val 188976173 ecr 188976173], length 39
  E..[..@.@.P....!.....P..u.M.O.......(p.....
  .C.-.C.-HTTP/1.0 200 OK

  Welcome to 20.0.0.9

  09:22:13.422694 IP 20.0.0.2.52200 > 20.0.0.33.http: Flags [P.], seq 3719333564:3719333637, ack 775289273, win 229, options [nop,nop,TS val 188976182 ecr 188976182], length 73
  E..}
  .@.@..........!...P.....5......(......
  .C.6.C.6GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*

  
  09:22:13.429202 IP 20.0.0.33.48444 > 20.0.0.29.http: Flags [P.], seq 3352428500:3352428600, ack 428882601, win 229, options [nop,nop,TS val 188976184 ecr 20738136], length 100
  E...s.@.@..<...!.....<.P......:.....(......
  .C.8.<pXGET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*
  X-Forwarded-For: 20.0.0.2

  
  09:22:13.429873 IP 20.0.0.29.http > 20.0.0.33.48444: Flags [P.], seq 1:41, ack 0, win 3620, options [nop,nop,TS val 20738136 ecr 188976184], length 40
  E..\J.@.@..m.......!.P.<..:........$(......
  .<pX.C.8HTTP/1.0 200 OK

  Welcome to 20.0.0.29

  09:22:13.429915 IP 20.0.0.33.http > 20.0.0.2.52200: Flags [P.], seq 1:41, ack 73, win 227, options [nop,nop,TS val 188976184 ecr 188976182], length 40
  E..\u.@.@......!.....P...5..........(q.....
  .C.8.C.6HTTP/1.0 200 OK

  Welcome to 20.0.0.29

  09:22:13.437423 IP 20.0.0.2.52203 > 20.0.0.33.http: Flags [P.], seq 1651650725:1651650798, ack 892136390, win 229, options [nop,nop,TS val 188976186 ecr 188976186], length 73
  E..}..@.@.U........!...Pbr0.5,......(......
  .C.:.C.:GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*

  
  09:22:13.438484 IP 20.0.0.33.33798 > 20.0.0.28.http: Flags [P.], seq 742963367:


  
  ^C742963467, ack 3974374035, win 229, options [nop,nop,TS val 188976186 ecr 91324], length 100
  E...4.@.@......!.......P,H....".....(......
  .C.:..d.GET / HTTP/1.1
  User-Agent: curl/7.35.0
  Host: 20.0.0.33
  Accept: */*
  X-Forwarded-For: 20.0.0.2

  
  09:22:13.439562 IP 20.0.0.28.http > 20.0.0.33.33798: Flags [P.], seq 1:41, ack 100, win 3620, options [nop,nop,TS val 91324 ecr 188976186], length 40
  E..\F0@.@../.......!.P....".,H.....$(......
  ..d..C.:HTTP/1.0 200 OK

  Welcome to 20.0.0.28

  09:22:13.439596 IP 20.0.0.33.http > 20.0.0.2.52203: Flags [P.], seq 1:41, ack 73, win 227, options [nop,nop,TS val 188976186 ecr 188976186], length 40
  E..\g.@.@..}...!.....P..5,..br0.....(q.....
  .C.:.C.:HTTP/1.0 200 OK

  Welcome to 20.0.0.28

  
  32 packets captured
  32 packets received by filter
  0 packets dropped by kernel

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1599781/+subscriptions


References