keith_varga_107
May 11, 2012Nimbostratus
limiting connections as well as allowing if all limits are reached
DevCentral Team,
Here is our current irule just below. it works fine, but the development team now wants to include the the following in addition to this rule. Also, once we see how to accomplish what they're asking, can we combine the rules (current irule included below)?
developer's question:
Is there a version of the load balancing rules to go to the next server in the pool when the current server has 300 connections? If all the servers have 300 connections I still want the F5 to send the request to a server. I'm just want to try and avoid more than 300 connections.
Current irule:
when HTTP_REQUEST {
HTTP::header insert "X_CLIENT_IP" [IP::client_addr]
HTTP::header insert "X-Forwarded-For" [IP::client_addr]
if { [string tolower [HTTP::uri]] contains "/pmcserver/checkforwork" } {
pool pm2_qa_web
return
} elseif { [string tolower [HTTP::uri]] contains "pmcserver" } {
pool pm2_qa_pmcserver
return }
elseif { [string tolower [HTTP::uri]] starts_with "/partner" } {
pool pm2_qa_soap
return } else {
pool pm2_qa_web return
}
}
Also, today, our developer had this suggestion as well. Would this approach be the way to go?
Roughly speaking... Start with a pool that limits its members to 300 connections. Lets call it pmcserver300-pool. Next, create a standard round robin pool called pmcserver-pool. Then create a rule roughly like... if (pmcserver300-pool(connection) == false) { pmcserver-pool(connection) } This assumes of course that sending a request to the pmcserver300-pool when all members are at their max 300 connections, that the connection failure can be caught and redirected to another pool.
thanks much,
Keith