Forum Discussion
Kevin_106976
Nimbostratus
Jul 16, 2010Distribute load based on uri
Hi,
I want to distribute load across two uri's (/some/uri1 and /some/uri2) on a 70/30 percentage basis. Can I do this via an iRule ?
15 Replies
- Chris_Miller
Altostratus
Posted By Kevin on 07/16/2010 04:39 PM - Kevin_106976
Nimbostratus
Thanks for replying Chris. Currently my iRule simply checks for either of these two uri's and sends it to pool "some_pool". Since its round robin, both the uri's get 50% of the traffic. I want to change that to 70/30. - The_Bhattman
Nimbostratus
Hi Kevin, - Chris_Miller
Altostratus
Posted By Bhattman on 07/17/2010 01:42 PM - Kevin_106976
Nimbostratus
Thanks for the replies and I apologize for not replying earlier - its been a crazy week. - Chris_Miller
Altostratus
You haven't clarified what you mean by 70/30 URI split...70% of URI 1 should go to server 1? 70% of URI 2 should go to server 2? - Kevin_106976
Nimbostratus
Say the "/some/index.html" has a link called "search", if 100 users click this link, 70 of the requests should go to URI1 and the remaining 30 should go to URI2. - Chris_Miller
Altostratus
Posted By Kevin on 07/25/2010 09:46 AM - Kevin_106976
Nimbostratus
Thats correct Chris. - The_Bhattman
Nimbostratus
Hi Kevin,when RULE_INIT { set counter 0 } when CLIENT_ACCEPTED { if {$::counter <= 7} { The first 7 connections go to Server A for URI 1 pool member incr $::counter } elseif {$::counter <= 10 } { The next 3 connections go to server B for URI 2 pool member incr $::counter } else { Reset the counter when 11th connection is reached and go to SERVER A for URI 1 set $::counter 0 pool member } }
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