Forum Discussion
Source port based load balancing using the persistence least connection
We have 1400 client with define source port from 8000 to 10000 and destination is 2 server for example (x.x.x.x and y.y.y.y)
We need irules for 8000 to 8500 source port load balance to x.x.x.x server if x.x.x.x fail send to y.y.y.y same thing goes all port.
Please help us to create the irules.
1) Source port 8000 to 8500
2) Source port 8501 to 9000
3) Source port 9001 to 9500
4) Source port 9501 to 10000
when CLIENT_ACCEPTED {
if { [TCP::client_port] starts_with "8000" ends_with "8500" } {
pool pool1
} elseif { [TCP::client_port] starts_with "8501" ends_with "9000" } {
pool pool1
}
elseif { [TCP::client_port] starts_with "9001" ends_with "9500" } {
pool pool1
}
elseif { [TCP::client_port] starts_with "9501" ends_with "10000" } {
pool pool1
}
}
Hi Faizan,
You can use less or grater oparators.
when CLIENT_ACCEPTED { if { [TCP::client_port] >= 8000 && [TCP::client_port] <= 8500 } { pool pool1 } elseif ...
- Faizan
Nimbostratus
Hi Eaa,
Thanks for helping me.
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