Forum Discussion
Kevin_106976
Jul 16, 2010Nimbostratus
Distribute 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 ?
- Chris_MillerAltostratusPosted By Kevin on 07/16/2010 04:39 PM
- Kevin_106976NimbostratusThanks 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_BhattmanNimbostratusHi Kevin,
- Chris_MillerAltostratusPosted By Bhattman on 07/17/2010 01:42 PM
- Kevin_106976NimbostratusThanks for the replies and I apologize for not replying earlier - its been a crazy week.
- Chris_MillerAltostratusYou 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_106976NimbostratusSay 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_MillerAltostratusPosted By Kevin on 07/25/2010 09:46 AM
- Kevin_106976NimbostratusThats correct Chris.
- The_BhattmanNimbostratusHi 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