Forum Discussion
ppphatak_127926
Nimbostratus
Nov 14, 2005node select expression
I need help from F5 expert on this one...
I have pools setup where I am using mapclass2node experession to have select correct node as per definitions in a class.
I wish to know if I can have many expressions as "node select expression". For example, can I write couple of if-elseif statements, or can I nest mapclass2node with other functions to achieve my goal?
If so, I would appreciate few examples pl. Documentation on node select expression is very theorotical and lacks examples, hence this question !
Thx
- Martin_MachacekHistoric F5 AccountI appologize for belated response. Unfortunately I don't have any good news for you. You cannot use if-then control constructs in the expression on the righthand side of "select" statement. Also mapclass2node cannot be nested (wrapped) inside of other functions. It is intended to be the top-level function in a select statement.
- ppphatak_127926
Nimbostratus
Sorry forgot to mention. It is 4.6.1 CR37770. - Martin_MachacekHistoric F5 AccountIt is true that additional cases in rules may impact performance, but what makes you believe that complex direct node select expression is going to be any better? Moreover, the bulk of performance impact of rules is due to late-binding which is necessary in order to collect data for the loadbalancing decision. Rule evaluation (especially on a well structured rule set) is a minor portion of the CPU time spent on rules. The only expesive operation during rule evaluation is regular expression matching (which can be avoided in majority of cases). Data collection (such as extraction of http_uri, cookies, headers, etc.) is performed only once (on each request) and results are cached. They key to well performing rule set is proper structure. You need to:
pool p1 { member server1:port1 member server2:port1 } pool pref_server1 { member server1:port1 priority 10 member server2:port1 } rule theRule { if(top_level_expression1) { if(special_case_expression1) { use pool pref_server1 } use pool pool1 } else if(top_level_expression2) { ... } else if ... }
pool p1 { select special_case_expression1_evaluating_to_node1; member server1:port1 member server2:port1 } rule theRule { if(top_level_expression1) { use pool pool1 } else if(top_level_expression2) { ... } else if ... }
- ppphatak_127926
Nimbostratus
Really appreciate your detailed reply. - Martin_MachacekHistoric F5 AccountLittle bit off-topic for this forum ... support for BIG-IP 540 has been added in version 9.2 which was released in September this year. So, the your previous information was correct. See version 9.2 release notes for details: Click here.
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