Forum Discussion
doug_hays_9832
Nimbostratus
Aug 17, 2006Is This Way Correct?
I am trying to create an Irule that will include our current rate limiting that is working for connections but unfortunately is blocking some proxy caches we want to allow and limit those caches to 500kbps. I have modified the Irule below to allow the proxies through with a different rate limit class of their own in the added If-aol-return section below but the proxies still cannot get through.
Thanks for your help
priority 700
when RULE_INIT {
array set ::active_clients { }
}
when CLIENT_ACCEPTED {
if { [matchclass [IP::remote_addr] equals $::monhosts] } {
return
}
if { [matchclass [IP::remote_addr] equals $::aol] } {
rateclass rate_limit_500kbps} {
return
}
set client_ip [IP::remote_addr]
if { [info exists ::active_clients($client_ip)] } {
incr ::active_clients($client_ip)
if { $::active_clients($client_ip) > 250 } {
drop
} elseif { $::active_clients($client_ip) > 150 } {
rateclass rate_limit_400kbps
} elseif { $::active_clients($client_ip) > 100 } {
rateclass rate_limit_800kbps
} elseif { $::active_clients($client_ip) > 50 } {
rateclass rate_limit_1600kbps
}
} else {
set ::active_clients($client_ip) 1
}
}
when CLIENT_CLOSED {
if { [info exists ::active_clients($client_ip)] } {
incr ::active_clients($client_ip) -1
if { $::active_clients($client_ip) <= 0 } {
unset ::active_clients($client_ip)
}
}
}
- doug_hays_9832
Nimbostratus
This is the part that is not working... - Colin_Walker_12Historic F5 AccountWhen you say it's "not working" what do you mean?
- unRuleY_95363Historic F5 AccountI'm a little baffled by the extra "} {" at the end of your rateclass statement. Perhaps you ought to remove that...
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