Forum Discussion
Narendra_26827
Jul 07, 2011Nimbostratus
iRule to read key/value pair from Data Group lists
We
have a requirement with our product that load balancer should be able to send
requests to a particular pool ip based on a configuration file that we should
have in the load balancer. Example: ...
Colin_Walker_12
Jul 08, 2011Historic F5 Account
Well, I can tell you that the pool member command is expecting either no port, or a port as a third argument. I'm not sure how well it's going to handle having the port tacked on with a colon. You might need to use split to separate the IP and port and pass them in separately, but that's pretty easy.
Other than that your logic looks relatively solid. You could probably change your "contains" operators to "ends_with" operators, assuming the test1.html and test2.html pages will always be the end of the URI. Frankly you could change HTTP::uri to HTTP::path to ensure that even if there is a query string it doesn't get considered, if you're trying to identify the particular page in question, not the query string. (More on path here: Click Here )
Also I'm still a bit unclear as to why you're doing a class match -name followed by a class match -value. By definition if you do a class match -value that results in anything other than an empty string you know that you have a valid name to start with, as only a valid name will result in a value response. Unless you're intending to do a -name search with a portion of a name value, and want to have it return the full value for some reason, I suppose.
Anyway, enough of my meanderings...looks good so far. ;)
Colin
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