Forum Discussion

mstiles_127829's avatar
mstiles_127829
Icon for Nimbostratus rankNimbostratus
Nov 19, 2004

Custom load balancer

I'm not sure if this is the right place to ask this, but is it possible to write a custom script for load balancing? The standard options on the Big IP are not working for us. Is there a framework for such a thing? Thanks in advance for any help.
  • bknotwell_12713's avatar
    bknotwell_12713
    Historic F5 Account
    A custom script for load balancing? You can't do it at this point.

     

     

    With that being said (caveat: I'm not exactly sure what you want), I might look at the following two things:

     

     

    1) some combination of a rule and class

     

    2) dynamic ratio load balancing (which collects information via SNMP from target hosts to create a weight for load-balancing decisions)
  • I need to load balancer to be able to query a table in a database before deciding where to send the connection. Based off of this query, it would have an accurate idea of the load on the server. There is really no other way to get this information. Can this be done?
  • Loc_Pham_101863's avatar
    Loc_Pham_101863
    Historic F5 Account
    Theoretically, you can also write a custom external monitor (EAV) script that does the database query to get the server load, do some number crunching to get some dynamic ratio, then use iControl's LocalLB::NodeAddress interface to set that dynamic ratio for the node address in question. This does not provide a way for your script to have its own LB algorithm, but at least it provides a way for your script to greatly influence how traffic is load-balanced.

     

     

    Loc
  • That's an interesting idea. I may give that a shot. Has anything like that been done before?
  • Loc_Pham_101863's avatar
    Loc_Pham_101863
    Historic F5 Account
    As an alternative, you can also write an iControl application that runs periodically on your servers, gathering server load statistics and other info, then sets the dynamic ratio via iControl.

     

     

    This method is a more pro-active way to influence the LB decisions on BIG-IP, and the client apps on the server can be written in any supported language, and used with any SOAP toolkits, of your choice.

     

    Loc