Forum Discussion
chris_connell_1
Nimbostratus
Oct 05, 2009Testing 50 servers
Hi,
We have 50 servers to test and send traffic through, the probe which simulates a client generates a stream of traffic every half an hour.
The problem is that w...
David_Larsen
Employee
Oct 20, 2009I actually wrote an iRule for this exact purpose. You have to make sure and have DNS working properly. This article in support will help with that: https://support.f5.com/kb/en-us/solutions/public/5000/200/sol5299.html.
Basically my rule uses DNS to process a URI for the string "server=server1.domain.com" and then takes the server name and does a DNS lookup and then connects to that single node. If "server=" is not in the URI string then it just moves on to whatever rule or pool you have balancing your normal traffic. This way you can monitor every server individualy for application functionality. The rule is below:
when CLIENT_ACCEPTED {
set debug 1
set servername "localhost"
}
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri] ]
if { $uri contains "server=" } {
set servername [findstr $uri "server=" 7 "&"]
if {$servername != "localhost"} {
HTTP::collect
NAME::lookup $servername
} else {
}
}
}
when NAME_RESOLVED {
set serverip [NAME::response]
if {$debug ==1 } {
log local0. "$servername IP address is $serverip"}
if {$servername != "localhost" } {
if { [catch {node $serverip [TCP::local_port] } ] } {
persist source_addr 60
log local0. "ERROR: attempting to assign to node $servername: $serverip"
}
}
HTTP::release
}
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
