Forum Discussion
F5-LTM load balancing question
Does anyone know what would be the equivalent of Cisco CSS Content Rule below in F5-LTM? The content rule will only kick-in if the url "/path/sample/" exist and therefore load balance to the backend servers. It looks like F5 does it all at the root "/" of the site without tweaking it.
content sample X vip address 10.48.132.78 url "/path/sample/*" add service server1 add service server2 port 80 protocol tcp primarySorryServer altpage1 secondarySorryServer altpage2 advanced-balance arrowpoint-cookie active
2 Replies
- Torti
Cirrus
you can do it on different ways. 1. with irule
if { [HTTP::uri] starts_with "/path/sample/" } { send to pool pool pool1 } elseif { [HTTP::uri] starts_with "/path/sample2/" } { send to pool2 pool pool2 } else { pool poolx }-
with classes / policies - here you only have to set the URI path list and as action you have to select the pool in the class.
class1 --> uri /path/sample/* --> action: send to pool pool1
class2 --> uri /path/sample2/* --> action: send to pool pool2
all other traffic:
class3 --> action: send to pool poolx
or use the default pool at virtual server --> you don't need class3
if you are running >= 11.4, you have to set policies instead of classes
-
- eds_104558
Nimbostratus
Thanks this works. We are new in F5, so we are kind of reluctant with iRule yet 'til we are comfortable with it. But the 2nd solution you presented works as well. Thanks again!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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