Testing Done: |
|
|---|
TWSD-1289 Load balancing of cookies where only the values associated with the keys differ.
Review Request #1447 — Created March 18, 2026 and updated
| 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"
| Description | From | Last Updated |
|---|---|---|
|
need to replace with the new tailq function(h2_debug_print_cookie_tailq_node) I guess ? |
|
|
|
I think it should be replace with h2_cookie_tailq_node_dtor function ? |
|
|
|
here also tailq function (h2_debug_print_cookie_tailq_node) |
|
|
|
here also it should be replaced with tailq function? |
|
|
|
Is this structure still required? I can see it is been replaced with cookie_tailq_node structure. |
|
-
-
branches/rel_apv_10_7/usr/click/lib/libhttp2/h2_hpack.c (Diff revision 1) need to replace with the new tailq function(h2_debug_print_cookie_tailq_node) I guess ?
-
branches/rel_apv_10_7/usr/click/lib/libhttp2/h2_hpack.c (Diff revision 1) I think it should be replace with h2_cookie_tailq_node_dtor function ?
-
branches/rel_apv_10_7/usr/click/lib/libhttp2/h2_trans_utils.c (Diff revision 1) here also tailq function (h2_debug_print_cookie_tailq_node)
-
branches/rel_apv_10_7/usr/click/lib/libhttp_proxy/misc.c (Diff revision 1) here also it should be replaced with tailq function?
-
branches/rel_apv_10_7/usr/src/sys/click/app/proxy/proxy.h (Diff revision 1) Is this structure still required? I can see it is been replaced with cookie_tailq_node structure.
Diff: |
Revision 3 (+639 -277)
|
|---|
Testing Done: |
|
|---|
