Forum Discussion
Dynamically Set Pool Member Ratio From Script Output
I'm currently going through the process of migrating some of our services away from haproxy to F5. (11.5.1 as of today.) Mostly this has been pretty easy, but one of our current products leverages haproxy's agent-check functionality, detailed here: http://cbonte.github.io/haproxy-dconv/configuration-1.5.html5.2-agent-check.
The gist of it is that you can have haproxy check TCP on a certain port, read the response and then adjust a node's weight accordingly. Or you can down the node entirely.
I need to replicate this functionality in the F5. If there's a simple solution, I'd prefer that of course. I'm not opposed to scripting something if need be. I've been eyeing iControlREST, but I'm not sure if that's the right path. Is there some out of the box process for doing this sort of thing that I'm missing? Thanks!
1 Reply
The LocalLB.Pool.set_member_ratio() method can be used to set the member's ratio dynamically. Here's the API docs for it:
https://devcentral.f5.com/wiki/iControl.LocalLB__Pool__set_member_ratio.ashx
You can script this in the language of your choice. Here's a Powershell example showing how to use that method call:
https://devcentral.f5.com/wiki/iControl.PowerShellPoolMemberRatioAndPriority.ashx
Hope this helps...
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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