Forum Discussion
Aidan_Carty_242
Nimbostratus
Jan 31, 2006Loadbalance redirects
Were migrating an internet application behind a BIGIP,
it has specfic url requirements so we have a simple iRule on a virtual server, all working fine.
rule redirect_to_webservers {
...
Flavien_Vincent
Nimbostratus
May 09, 2006Hello everyone.
First, I'm not belingual so excuse my English.
In my configuration, I have one pool named all_support_pool_fla and 4 servers. My goal is to share http and ftp traffic like this : two servers deal whith http traffic and two others deal whith ftp traffic. But all the servers are in the pool all_support_pool_fla.
Members of my_pool had been defined like that :
172.20.50.100:80
172.20.50.100:21
172.20.50.101:80
172.20.50.101:21
172.20.50.102:80
172.20.50.102:21
172.20.50.103:80
172.20.50.103:21
I want to create an iRule which can share traffic between them. I know this can be done easily by create two pools, but I like to make my life harder:P
By taking exemple on this iRule I made another one :
when RULE_INIT {
set ::compteur_http 1
set ::compteur_ftp 1
}
when HTTP_REQUEST {
if { [TCP::local_port] eq "80" } {
if { $::compteur_http == 1 } {
set ::compteur_http 2
pool all_support_pool_fla member 172.20.50.100:80
}
elseif { $::compteur_http == 2 } {
set ::compteur_http 1
pool all_support_pool_fla member 172.20.50.101:80
}
}
if { [TCP::local_port] eq "21" } {
if { $::compteur_ftp == 1 } {
set ::compteur_ftp 2
pool all_support_pool_fla member 172.20.50.102:21
}
elseif { $::compteur_ftp == 2 } {
set ::compteur_ftp 1
pool all_support_pool_fla member 172.20.50.103:21
}
}
}
But there is two problems. First, FTP traffic doesn't run. I think this is because I used this in a block with HTTP_REQUEST. Should I use CLIENT_ACCEPTED or something else?
And secondly this iRule is run each time a client connect to the virtual server, so every time the client is directed to the server 172.20.50.100 (for HTTP of course), and I want to use a load balancing like Round Robin (no more complication it's useless:D) in the iRule.
Please help me.
Thanks.
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