Forum Discussion
Use Datagroup like a Pool
Hi all, I have a Datagroup with 2 values: - IP Address of Servers; - Value of Server Loads.
Is there a way to load balance connections to these Datagroup Members (related to their Servers Load)?
In other words, is there a way to use a Datagroup like a "Pool" for Load Balance connections directed to a Virtual Server? If yes, do you have some examples to do it?
Thanks
4 Replies
- IainThomson85_1
Cumulonimbus
Unsure on what you're trying to achieve - What is a "Servers Load" ? The server Capability ?
Could you not accomplish this by using Ratio based Load balancing ?
- Antonio_349
Nimbostratus
My target is: - Application Server (where connections will be balanced) will write a Datagroup with Powershell (iControl); - Datagroup will be compiled with two values: IP Address of Application Server and one Value (from 1 to 5, where 1 is "server with low load" and 5 is "server with high load"). - F5 have to load balance connection using this Datagroup like a Pool. Is it possible to do this? I need to do and iRule to load balance based on this Datagroup.
- Vijay_E
Cirrus
I feel this is quite complicated way of distributing the load. Have you tried the simple methods first and failed ? My recommendations are "Least Connections (Member)" for starters and then try the Predictive method. Utilize OneConnect if you want to load balance HTTP Requests instead of connections.
If you still insist on using datagroup, this is a rough iRule for starters:
when CLIENT_ACCEPTED { if { [class search -value CLASS_DATAGROUP] eq "1" } { set IP [class search CLASS_DATAGROUP] node $IP 80 } }I would like to warn that using node in iRule can break certain persistence function and has caused trouble when upgrading between 10.x and 11.x code version.
- VernonWells
Employee
As
@Odaahsays, the use of a dynamic LB method should be preferred if one of them addresses your need. You mention that you want to use load information. If they can be can be exposed via SNMP, the the Dynamic Ratio method (together with a properly configured monitor) can do that:If this must be done statically, it would probably be better to use the Static Ratio method, then use iControl (which can be accessed using PowerShell) to periodically modify the pool ratio configuration. (I assume you want to ratio LB, but if you simply want to send all traffic to the "least loaded" server, you could also use priority group activation and use iControl to modify priority group membership). This approach is probably better because the built-in method will perform better than an iRule, and it quite a bit simpler.
- For >= 11.4: iControlRest
- For < 11.4: Legacy iControl
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