Forum Discussion
californiaroll_
Nimbostratus
Aug 18, 2009How does this work?
Hi all,
I am new to iRule and have just given a following script that my predecessor left.
I could not figure out how this works even though it is pretty short.
Please give me any hints or hopefully an answer.
Thank you
----------------------------------------------
if (client_addr == 0.0.0.0 netmask 0.0.0.1) {
use pool xxx-http-1
}
else {
use pool xxx-http-2
}
----------------------------------------------
- The_Bhattman
Nimbostratus
This looks more like a a version 4 Rule. iRules is v9 and v10. - spark_86682Historic F5 AccountThis is actually very clever. What it is doing is sending clients whose IPs have an even last octet to pool xxx-http-1, and those with odd last octets to pool xxx-http-2. It's a way of statelessly load-balancing between pools.
- The_Bhattman
Nimbostratus
You are right Sparks. How could I have not seen that. Way cool. - californiaroll_
Nimbostratus
I could understand how it works. Thank you guys!! - hoolio
Cirrostratus
It's a novel solution and should provide very quick "persistence" to the two pools, but it doesn't provide any kind of higher level functionality that you would get if you added all the members to the same pool and used a load balancing algorithm like least connections or observed to select the best pool member. In v9 or 10 it also doesn't offer any persistence within the two different pools (persistence was set at the pool level in 4.x so this wouldn't have been an issue).
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