Forum Discussion
JT_46093
Dec 23, 2011Nimbostratus
iRule using web service for LB decision
Hi,
I want to write an iRule that contacts a web service to find out which back end server to send the connection to. I know this would not be fast but the connections I'm balancing are long lived connections so a slower intial connection is not a problem.
I was hoping to use the features in TCL to do this. Notably...
http://tmml.sourceforge.net/doc/tcl/http.html
The idea was to contact the web service on CLIENT_ACCEPTED.
Process the response from the web service to find the server and port to use
use the node command to define the back end machine the BIG-IP will send the traffic to
The traffic being balanced is not HTTP, just TCP. So the only HTTP involved is where the irule is acting as a web client to the web service to find out the machine to use.
When I have tried this it seems that the http parts of TCL are not available in iRules. Is this right? Can anyone think of a way to do this?
Thanks
- nitassEmployeeis sideband usable?
- JT_46093NimbostratusThanks for the quick response.
- nitassEmployeewhat about this one?
- JT_46093NimbostratusYes I had a look at that but unfortunatly the connection I'm trying to balance isn't HTTP so I have no way to trigger the HTTP events of HTTP::retry.
- Colin_Walker_12Historic F5 AccountCould the web service be made to respond to a DNS query with the information needed? If so we could use the RESOLV::lookup command to fire off a request and then you could act on the response.
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