Forum Discussion
juergen_lampar1
Jun 24, 2014Nimbostratus
dynamic loadbalancing using value from node
hi,
can i dynamic loadbalaning with values from the node´s application?
the application writes a score from 1 to 10 in a file.
can the LTM this score in a table writing and the node with the best sco...
Kevin_Stewart
Jun 24, 2014Employee
Two things worth considering:
-
If you needed this to be a real-time thing, then you'd necessarily have to query each server and compare scores on each new user session. To do this you'd use a series of sideband calls inside an iRule, and that would invariable add some latency.
-
Doing this in a monitor makes it, by definition, an asynchronous process, so you could just as well have a script poll all of the servers periodically and then update ratio values of a given pool. Something like this:
!/bin/bash define pool name pool="local-pool"; define pool member listener port port=80; arr=($(tmsh list ltm pool $pool |grep address |awk -F" " '{ print $2 }')); for x in "${arr[@]}" do score=`curl -fNs http://$x/score.php`; tmsh modify ltm pool $pool members modify { $x:$port { ratio $score } }; done
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