TWSD-1289 Load balancing of cookies where only the values associated with the keys differ.
Review Request #1447 — Created March 18, 2026 and updated — Latest diff uploaded
| Information | |
|---|---|
| tanya | |
| APV10 | |
| TWSD-1289 | |
| Reviewers | |
| mmiriam, pradeep, weikai | |
The http request cookies are places in the list when the cookie headers are parsed which causes them to be in the FILO order. But by protocol we should be looking in the same order as were in the cookie header i.e. FIFO. so this code changes storing from SLIST to TAILQ
Tested slb persistant cookie and http parser are tested and working as expected
Server1 gets picked when I send --- curl -v -H "Cookie: my_cookie=ID_Server1; my_cookie=ID_Server2" http://192.168.163.151/
Server2 gets picked when I send --- curl -v -H "Cookie: my_cookie=ID_Server2; my_cookie=ID_Server1" http://192.168.163.151/
here is the configuration for my test
slb configuration
slb real http "rs1" 192.168.163.152 8080 0 tcp 3 3
slb real http "rs2" 192.168.163.152 8090 0 tcp 3 3
slb group method "gr_PC" pc 0
slb group member "gr_PC" "rs1" "ID_Server1" 0
slb group member "gr_PC" "rs2" "ID_Server2" 0
slb virtual http "vs1" 192.168.163.151 80 arp 0
slb virtual health off
slb policy persistent cookie "pol_PC" "vs1" "gr_PC" "my_cookie" 1In http2 mode tested that cookies extracted correctly
config for the http2 need to configure virt ssl host and enable http2 on the vsslb real http "rs1" 192.168.163.152 8080 0 tcp 3 3
slb real http "rs2" 192.168.163.152 8090 0 tcp 3 3
slb group method "gr_PC" pc 0
slb group method "gr_RR" rr
slb group member "gr_PC" "rs1" "ID_Server1" 0
slb group member "gr_PC" "rs2" "ID_Server2" 0
slb group member "gr_RR" "rs1" 1 0
slb group member "gr_RR" "rs2" 1 0
slb virtual https "vs2" 192.168.163.151 443 arp 0
slb policy persistent cookie "pol_PC_vs2" "vs2" "gr_PC" "my_cookie" 1
slb policy default "vs2" "gr_RR"
http2 virtual on "vs2"
