Forum Discussion

Duck3D_25079's avatar
Duck3D_25079
Icon for Nimbostratus rankNimbostratus
Jan 21, 2011

source_addr persistence not working

I have a simple iRule that I use to distribute traffic during deployments. Since pools a and b represent different versions of the site I need to ensure persistence. Source Address persistence should be good enough for my purposes but its not working! I'm sure I'm missing something but I just cant find it.

 

 

The rule below is intended to distribute traffic to two pools based on a percentage set by the integer X. --> ([expr rand()] * 100 < X) the value for X is changed over the course of a deployment through iControl. The distribution of traffic works as it should. however persistence does not work at all!

 

 

 

when HTTP_REQUEST {

 

if { [expr rand()] * 100 < 50 }{

 

log local0. "pool a \ [IP::remote_addr]"

 

pool test-http-a

 

persist source_addr

 

} else {

 

log local0. "pool b \ [IP::remote_addr]"

 

pool test-http-b

 

persist source_addr

 

}

 

}

 

 

Here are some log results showing the lack of persistence:

 

Jan 21 10:37:56 tmm1 tmm1[1880]: Rule test-http-ab-rule : pool a 192.168.2.181

 

Jan 21 10:37:56 tmm1 tmm1[1880]: Rule test-http-ab-rule : pool a 192.168.2.181

 

Jan 21 10:37:56 tmm1 tmm1[1880]: Rule test-http-ab-rule : pool b 192.168.2.181

 

Jan 21 10:37:57 tmm1 tmm1[1880]: Rule test-http-ab-rule : pool a 192.168.2.181

 

Jan 21 10:37:57 tmm1 tmm1[1880]: Rule test-http-ab-rule : pool a 192.168.2.181

 

Jan 21 10:37:57 tmm1 tmm1[1880]: Rule test-http-ab-rule : pool b 192.168.2.181

 

 

 

I was thrilled to find this article regarding CMP demotion:

 

https://support.f5.com/kb/en-us/solutions/public/9000/200/sol9268.html

 

 

however a check of the CMP status showed the appropriate automatic demotion:

 

[user@device:Active] ~ bigpipe virtual staging-http cmp mode show

 

VIRTUAL test-http - CMP mode: single

 

 

I'm out of ideas so I'm turning to the Jedi Masters for help.

 

 

p.s. running version: BIG-IP 9.4.8 Build 355.0 Final

 

 

 

 

 

 

 

 

  • In my case I was using separate pools to represent two different builds of the software when I really didn't have to. The smarter solution for me was to use a single ratio balanced pool with persistence.

     

    However, it seems that if I had enabled a persistence profile that enforced persistence across pools this may have worked as originally intended but I never did actually try that.

     

     

    -James