Forum Discussion
JT_46093
Nimbostratus
Dec 23, 2011iRule 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
5 Replies
- nitass
Employee
is sideband usable?
sideband wiki
http://devcentral.f5.com/wiki/iRules.SIDEBAND.ashx
v11 iRules: Intro to Sideband Connections by Colin
http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/1086484/v11-iRules-Intro-to-Sideband-Connections.aspx - JT_46093
Nimbostratus
Thanks for the quick response.
Yes I think sideband would do it. However I don't have a version 11 BIG-IP :-( - nitass
Employee
what about this one?
Conditioning iRule Logic on External Information - 01 - HTTP::retry by Deb
http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/105/Conditioning-iRule-Logic-on-External-Information--01--HTTPretry.aspx - JT_46093
Nimbostratus
Yes 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.
Just a thought. :)
Colin
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
