Forum Discussion
Fletcher_Cocquy
Sep 27, 2011Nimbostratus
iRule to select test pool based on cookie/env variable?
Hi all,
we have a virtual server mapping to a pool with one apache web node.
client wants to test the new node via the virtual server.
Can we craft an iRule to direct her session to the new pool/node based on a cookie/env variable she sets beforehand ? (and then reset her session routing back to production after her testing is done?) (I imagine this kind of scheme could also integrate with the app itself so the app say picks up the cookie and announces when its in test mode)
Can someone please point me at an example of this or suggest a better way to do this with our BigIPs? (BIG-IP 10.2.1 Build 511.0 Hotfix HF3)
cheers,
Fletch
http://vmadmin.info
- Brian_69413NimbostratusIf you know her IP address, you could filter it that way.
- hooleylistCirrostratusYou could add the new member at a lower priority and then use an iRule like this to allow manual selection of it with a query string parameter and cookie:
when CLIENT_ACCEPTED { if {[IP::addr [IP::client_addr] equals 1.1.1.1]}{ node 10.1.1.1 80 } }
- Michael_YatesNimbostratusI agree with Brian. Filtering and routing on the Client IP Address is the easiest solution. If you have more than one IP Address to filter on / route to test this node then I would suggest using a Data Group.
when HTTP_REQUEST { if { [IP::client_addr] equals "10.10.10.10" } { node 20.20.20.20 80 } }
- Fletcher_CocquyNimbostratusThanks for all the feedback - I am testing the member=[1,2] iRule - (the tester's IP varies) - it seems to work great - EXCEPT
- hooleylistCirrostratusAre clients going through a proxy to get to the virtual server? If you take the iRule off, do you see the same issue with pool member selection?
- hooleylistCirrostratusIf using OneConnect and the iRule doesn't fix the issue, can you enable debug in the HTTP_REQUEST event and reply with anonymized logs from /var/log/ltm?
- Fletcher_CocquyNimbostratus" If you take the iRule off, do you see the same issue with pool member selection?"
- hooleylistCirrostratusCan you enable debug on the iRule and reply with the output from /var/log/ltm?
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