Forum Discussion
K_E_49611
Nimbostratus
Sep 14, 2005Rules / Class / Performance
Hello,
I am trying to determine the best way to manage traffic using rules. Based these posts, it seems the classes are the way to go.
My understanding:
1) classes are better than multiple conditions
2) once a condition is satisfied, the rule stops being parsed
3) best to have muliple rules with fewer conditions than few rules with more conditions.
My example: 1000 logical pools; Each pool = 2 Nodes(IP:Port); 100 Physical Servers;
Which scenario will provide better performance A, B, same or other?
If B, is there a point where too many classes is a hindrance?
Scenario A: 20 rules = each rule having 50 if / else-if conditions, one per pool = 1000 elements
If http_uri contains “string1”
use pool string1
else if http_uri contains “string2”
use pool string2
else if …etc x 50
Scenario B: 5 rules = with 10 classes IFs, each with 20 sub-conditions = 1000 elements
ClassA = "string1" "string2" ..etc x 10
ClassB = "sting30" "string31" ...etc x 10
Class ...etc x 10 classes.
If http_uri contains one of classA
{ If http_uri contains “string1”
use pool string1
else if http_uri contains “string2”
use pool string2
…etc x 10
}
Else if http_uri contains one of classB
{ If http_uri contains “string30”
use pool string30
else if http_uri contains “string31”
use pool string31
…etc x 10
Else if …etc x 10 class IF’s.
Scenario A - the rule would have to be checked max 49 times before the last condition is met.
Scenario B - the rule would have to be checked 9 Main IF's + 9 Inner IF's before getting to the very last conditions = 18 checks.
B sounds obvious, looking for feedback, other pointers or opinions.
Sorry for the long read, thanks for sticking it out.
- Brian_Gupta_115
Nimbostratus
A few questions: - K_E_49611
Nimbostratus
Here's more info, thanks for helping.
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