Forum Discussion
Robert_47833
Altostratus
Jul 04, 2011need help in forward uri to different pool via specific percentage
I have two pool: cjj1 ,cjj2
1:for uri in data group aaa, send 80% request to cjj1 and 20% to cjj2
2:if one client visit cjj1,all other requests from this client should be sent to cjj1,s...
hoolio
Cirrostratus
Jul 05, 2011Hi Jucao,
You can create a string datagroup with the URIs and then use the class command (v10) or the matchclass command (v9) to do the lookup. You can use the rand function to do ratio load balancing between the pools. For requests sent to cjj pool, you can set a cookie and check for that cookie before selecting between the pools. Cookie insert persistence would not work for this scenario as default persistence ensures persistence within a single pool.
Here are a few related links:
http://devcentral.f5.com/wiki/default.aspx/iRules/class
http://devcentral.f5.com/wiki/default.aspx/iRules/matchclass
http://devcentral.f5.com/wiki/default.aspx/iRules/ratio_load_balancing_using_rand_function.html
http://devcentral.f5.com/wiki/default.aspx/iRules/http__cookie
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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