Forum Discussion
jaimes_39948
Aug 03, 2012Nimbostratus
iRule that percentage Load Balances Between Two CDN CNAMEs
Starting a new post, because I think my previous one might be off topic. I have a need to have the GTM load balance, percentage wise, between to AWS CDN CNAMES I have the WideIP setup using pools that don't have VS assigned but as assigned with the CDN CNAMES. Trying to figure out how to load balance the requests so that 2% of the resolution goes to the second CNAME.
I have the above iRule setup.
when DNS_REQUEST {
if { rand() < 0.02 } {
cname www-1378117844.us-west-1.elb.amazonaws.com
}
}
The wideIP points to a pool that has the other CDN CNAME in it. The question is, how do I load balance between both CDN CNAMES within the Irule. For instance if I wanted 60 percent to goto one CNAME and 40 percent to the other?
Thanks in advance,
Jaime
- hooleylistCirrostratusHi Jaime, Can you try this:
when DNS_REQUEST { if { rand() < 0.60 } { cname www-1378117844.us-west-1.elb.amazonaws.com } else { cname other.amazonaws.com } }
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