Forum Discussion

Matt_60027's avatar
Matt_60027
Icon for Nimbostratus rankNimbostratus
Sep 05, 2012

Load Balancing Web Services

I am looking for a way to collect a single availability number from a web service then use this number in the Dynamic Ratio Load Balancing.

 

 

My initial thoughts were to use an External Monitor, and retrieve a value from a REST endpoint on the server, specific for the service. This REST service would return a value 0-100 for the load, then that number would be used in the Dynamic Ratio method.

 

 

I had looked into using SNMP, but I think creating a custom MIB for this value may not be supported on the F5 and creating it on both .NET and JAVA is more work than being able to use a REST endpoint.

 

 

How are others doing this? Is anyone load balancing to a service endpoint and not to the server level? Does F5 have a preferred method for doing something similar to this?

 

  • Hi Matt,

     

     

    Since most Web Services do not have long connection times I find that Round Robin or Least Connections (member or node) generally suffice for normal operation.

     

     

    If you truly want to create a custom type of monitor you could create a custom Health Monitor to put on the nodes that would read your endpoint and based upon the numeric value, remove the node from the pool of available servers (probably undesireable since you could create a situation where you have no members in the pool and things start to fail).

     

     

    The other load balancing methods use thier own built in methods for determining which server to send the traffic to:

     

     

    Dynamic Ratio (node) : This method is similar to Ratio (node) mode, except that weights are based on continuous monitoring of the servers and are therefore continually changing. This is a dynamic load balancing method, distributing connections based on various aspects of real-time server performance analysis, such as the number of current connections per node or the fastest node response time.

     

     

    Dynamic Ratio (member): This method is similar to Ratio (node) mode, except that weights are based on continuous monitoring of the servers and are therefore continually changing. This is a dynamic load balancing method, distributing connections based on various aspects of real-time server performance analysis, such as the number of current connections per node or the fastest node response time.

     

     

    I've looked at but not implemented the SNMP Monitor myself, but the method will again remove the node from the pool if the conditions you set are experienced.

     

     

    Hope this helps.
  • Yes, I would like to use Dynamic Ratio Load balancing, but I want to use a value I define (based on processor, memory, connections...) to load balance on. Is there a way that I can create a value in an External Monitor that I can update and use in the Dyanmic Ration Load Balance method?