Forum Discussion
dogg_dogg_23774
Nimbostratus
Sep 20, 2006Retrieving info from server
Hello,
I was asked from one of customers if we can do something like the following.
They are planning to deploy streaming service and need to loadbalance.
Initially tcp connections are loadbalanced, and for outbound udp connections, server would bypass Big-IP and directly connect to the client. If the aggregate of all outbound connections from each server exceed certain limit, they want to disable the virtual server on Big-IP. Big-IP can retrieve info on the number of connecition using WMI, RealServer plugin, or SNMP DCA for dynamic ratio loadbalancing but not sure if it is possible to use the info for other purposes like within iRule.
My question is:
Is it possible to use info retrived from server as above in order to manipulate the status of VS using iRule?
thanks,
4 Replies
- The best solution for your question is to implement this as an iControl solution. You can use the calling executable to request the aggregate number of connections from the backend servers and then disable the virtual from an iControl call.
If you want to do this with an iRule it is tricky but theoretically could be done with something like this
1. Every "n" requests, change the URI in the HTTP_REQUEST event to point to a "health" service that will return the metrics you want to work on in either headers or payload.
2. On the HTTP_RESPONSE, if the request was from the health service, then check the returned metrics.
3. If metrics say to stop connections, issue a "reject" command.
4. If metrics give a green light to continue, change the HTTP::uri back to the original value and issue a HTTP::retry. This will retry the HTTP request to the pool of servers. Keep in mind that you'll have to buffer the entire HTTP::request (headers) and the HTTP::payload and include both of them in the call to HTTP::retry.
Theoretically this could work but it has not been tested.
Hope this helps...
-Joe - dogg_dogg_23774
Nimbostratus
Thanks for the reply!
In my scenario, because the info on the number of outbound concurrent connection is not on Big-IP, retreiving the info from Big-IP would be difficult. IMHO, workaround would be that one of servers retrieve the info from all the members and then, if the it exceeds the limit, issue a call to disable VS.
The suggestion to retrive the value from response for request to specific URI looks good, I shall try.
regards, - dogg_dogg_23774
Nimbostratus
I am trying to create a rule like below to test the logic suggested, but it looks like it is failing...
when HTTP_REQUEST {
changeing URI.
HTTP::uri "/check_conn"
}
when HTTP_RESPONSE_DATA {
checking number of connections.
if { [findstr [HTTP::payload] "Concurrent=" 11 14] matches "100"
}
reject
return
}
Does anyone know how to get this work more gracefully or have some samples so I can customize it in my environment??
regards, - Colin_Walker_12Historic F5 AccountThe HTTP_RESPONSE_DATA event won't be fired unless you call [TCP::collect inside the HTTP_RESPONSE event.
You'll also want to be sure to do a TCP::release after you're done precessing the payload.
Colin
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
