Forum Discussion
Robert_47833
Jul 29, 2011Altostratus
how to insert cookie and persist to it
Hi,dear irule
I have a pool cjj which has 10 members ,ration is the load blance method
I need to insert cookie and persist with cookie ,
for example client1 ----->VS---->pool member1 ,then insert one cookie(session cookie) to it, then persist this connection to the same pool member.
when HTTP::request {
if [HTTP::uri] starts_with "help"
pool cjj
persist cookie insert BIGIP_ABURL 0
}
when I want to apply it to the VS,it told me I need to add a persist profile
but I don't want to add a profile.because there are 10 pools under this vs and in this irule(don't want to use persist none in them,too many pools)
it will affect them
1:how to resolve this?
2:in the rule above,I don't set the cookie value,bigip will set it atuomatically?
pls help
12 Replies
Sort By
- The_BhattmanNimbostratusHi Jucao,
- Robert_47833AltostratusHi,Bhattman
- The_BhattmanNimbostratusHi Jucao,
- Robert_47833AltostratusHi,Bhattman
- The_BhattmanNimbostratusHi Jucao,
when HTTP_REQUEST timing on { if {[class match $uri starts_with gen3abURLs_SRWD29] } { log local0. "Entering testi" set rand [expr { rand() }] set value_cookie "" switch -glob [HTTP::cookie value_cookie] { "1" { pool cjj1 } "2" { Pool cjj2" } default { if { $rand <0.2 } { Pool cjj1 set value_cookie 1 } else { pool cjj2 set value_cookie 2 } } } } } when HTTP_RESPONSE { if {$value_cookie ne "" } { HTTP::cookie insert name value_cookie value $value_cookie path "/" } }
- Robert_47833AltostratusHi,Bhattman
- The_BhattmanNimbostratusHi Jucao,
- Robert_47833AltostratusHi,Bhattman
- Robert_47833Altostratusbtw,what is the unit of cycle?
- Robert_47833AltostratushI,Bhattman
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects