Forum Discussion
Chris_Stamm_183
Nimbostratus
Aug 10, 2005RPC load balancing among multiple tiers using iRules, pools and forwarding
Scenario:
We have an app that uses...
TCP port 7496 for one piece.
TCP port 3372 for another piece.
TCP port 135 for DTC that will renegotiate a high port in this case we set the RPC rang...
unRuleY_95363
Aug 10, 2005Historic F5 Account
I'm not sure if you are asking a question here?
I will make a couple of notes though.
First, TCP::server_port will likely return 0 in the CLIENT_ACCEPTED event. This is because the backend connection has yet to be made and we made the following changes from 4.x:
client = clientside remote
server = serverside remote
remote = clientside source or serverside destination
local = clientside destination or serverside source
So, TCP::server_port refers to the serverside TCP::remote_port or the serverside's destination port. At the time CLIENT_ACCEPTED is evaluated, the proxy hasn't connected the serverside, so this information is not yet available. You probably want to use TCP::local_port instead.
Second, your last two rules look identical and you could probably simply use the same rule for both virtuals.
Third, you could probably use a condensed if expression or a switch statement in the second rule since all the cases use a forward.
As a single if:
when CLIENT_ACCEPTED {
if { [TCP::local_port] == 135 or \
[TCP::local_port] == 3372 or \
[TCP::local_port] == 7495 or \
( [TCP::local_port] >= 40000 and [TCP::local_port] < 45000 ) } {
forward
} else {
discard
}
}As a switch:
when CLIENT_ACCEPTED {
switch -glob [TCP::local_port] {
135 -
3372 -
7495 -
4[01234]??? { forward }
default { discard }
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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