Forum Discussion
Jeff_Wyant_4852
Nimbostratus
Jun 14, 2006Direct a % Traffic to Two App Pools
Currently all web traffic goes to one app pool for our current web site. We are in the process or changing our web site and for testing purposes I need to write an irule that would direct a % of traffic to the new app pool. Somthing like 90% to the old site, and 10% to the new.
3 Replies
- You could do this with a counter.
when RULE_INIT { initialize the global counter set ::request_num 0 } when HTTP_REQUEST { Increment the counter incr ::request_num if { $::request_num < 10 } { request 1-9 will go to poolA pool poolA } else { the 10th request will go to poolB pool poolB Reset the counter set ::request_num 0 } }
- Jeff_Wyant_4852
Nimbostratus
Using the counter, will each http get request increment the counter? My question is how could I also keep the "session" going to the same enviroment, old or new? - hoolio
Cirrostratus
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